From 1896d1032b221bcc3c13303f56d43d98532557a6 Mon Sep 17 00:00:00 2001 From: funjia <13429193897@163.com> Date: Sat, 5 Sep 2026 00:07:47 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E4=BD=BF=E7=94=A8deepseek=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BA=86=E4=BB=A3=E7=A0=81=E5=92=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 117 +++- src/components/22寸一体机_4G_120G.vue | 158 +---- src/components/24寸一体机_I5_3代_8G_256G.vue | 158 +---- src/components/CustomTag.vue | 194 ++---- src/components/DynamicForm.vue | 231 ++++++- src/components/Error.vue | 131 +--- src/components/G3260_8G_120G.vue | 156 +---- src/components/HardDisk.vue | 158 +---- src/components/I3_4130_8G_120G.vue | 156 +---- src/components/I5_10400F_16G_256G_1060.vue | 156 +---- src/components/I5_10400F_16G_512G_2060.vue | 156 +---- src/components/I5_4590_8G_120G.vue | 156 +---- src/components/I5_9400F_16G_256G_1060.vue | 156 +---- src/components/LabelCell.vue | 191 ++++++ src/components/Main.vue | 661 +++++++++++++++---- src/components/Select/index.vue | 16 +- src/style.css | 3 +- 17 files changed, 1255 insertions(+), 1699 deletions(-) create mode 100644 src/components/LabelCell.vue diff --git a/README.md b/README.md index 1511959..f8bdb83 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,116 @@ -# Vue 3 + Vite +# 标签打印系统(Label Print System) -This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` - \ No newline at end of file diff --git a/src/components/24寸一体机_I5_3代_8G_256G.vue b/src/components/24寸一体机_I5_3代_8G_256G.vue index b5e7798..0e8ea0c 100644 --- a/src/components/24寸一体机_I5_3代_8G_256G.vue +++ b/src/components/24寸一体机_I5_3代_8G_256G.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/CustomTag.vue b/src/components/CustomTag.vue index 2185f22..aecc981 100644 --- a/src/components/CustomTag.vue +++ b/src/components/CustomTag.vue @@ -1,164 +1,82 @@ + + \ No newline at end of file + diff --git a/src/components/DynamicForm.vue b/src/components/DynamicForm.vue index f07af27..de4c21f 100644 --- a/src/components/DynamicForm.vue +++ b/src/components/DynamicForm.vue @@ -1,31 +1,32 @@ - - \ No newline at end of file diff --git a/src/components/G3260_8G_120G.vue b/src/components/G3260_8G_120G.vue index d1e00fe..7c30415 100644 --- a/src/components/G3260_8G_120G.vue +++ b/src/components/G3260_8G_120G.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/HardDisk.vue b/src/components/HardDisk.vue index c4e7f29..e99c63a 100644 --- a/src/components/HardDisk.vue +++ b/src/components/HardDisk.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/I3_4130_8G_120G.vue b/src/components/I3_4130_8G_120G.vue index 1578c7e..295540a 100644 --- a/src/components/I3_4130_8G_120G.vue +++ b/src/components/I3_4130_8G_120G.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/I5_10400F_16G_256G_1060.vue b/src/components/I5_10400F_16G_256G_1060.vue index edfd6ff..c18bdab 100644 --- a/src/components/I5_10400F_16G_256G_1060.vue +++ b/src/components/I5_10400F_16G_256G_1060.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/I5_10400F_16G_512G_2060.vue b/src/components/I5_10400F_16G_512G_2060.vue index c976866..d728d63 100644 --- a/src/components/I5_10400F_16G_512G_2060.vue +++ b/src/components/I5_10400F_16G_512G_2060.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/I5_4590_8G_120G.vue b/src/components/I5_4590_8G_120G.vue index fff676e..d37c6a2 100644 --- a/src/components/I5_4590_8G_120G.vue +++ b/src/components/I5_4590_8G_120G.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/I5_9400F_16G_256G_1060.vue b/src/components/I5_9400F_16G_256G_1060.vue index 1ec8cc8..dce4887 100644 --- a/src/components/I5_9400F_16G_256G_1060.vue +++ b/src/components/I5_9400F_16G_256G_1060.vue @@ -1,34 +1,22 @@ + - \ No newline at end of file diff --git a/src/components/LabelCell.vue b/src/components/LabelCell.vue new file mode 100644 index 0000000..8bd6c2a --- /dev/null +++ b/src/components/LabelCell.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/Main.vue b/src/components/Main.vue index a6b52cb..a7e85ef 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -1,40 +1,114 @@ \ No newline at end of file + diff --git a/src/components/Select/index.vue b/src/components/Select/index.vue index acfa7d6..7727009 100644 --- a/src/components/Select/index.vue +++ b/src/components/Select/index.vue @@ -47,13 +47,21 @@ import { } from '@headlessui/vue' // import { CheckIcon, ChevronUpDownIcon } from '@heroicons/vue/20/solid' -const props = defineProps(["data"]); -const selectedPerson = ref(props.data?.length > 0 ? props.data[0] : null); +const props = defineProps(["data", "modelValue"]); +const selectedPerson = ref(props.modelValue ?? (props.data?.length ? props.data[0] : null)); const emits = defineEmits(["update:modelValue"]); -watch([selectedPerson], ([newSelected]) => { - emits("update:modelValue", newSelected); +// 外部值变化时同步内部选中项(如“单格编辑”切换模板) +watch(() => props.modelValue, (val) => { + if (val) selectedPerson.value = val; +}); + +// 内部选中变化时通知父组件 +watch(selectedPerson, (newSelected) => { + if (newSelected !== props.modelValue) { + emits("update:modelValue", newSelected); + } })