From 4e56f2fece09c5b9ed89dfd56a8cc79e87bb0870 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 16 Oct 2026 16:42:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=95=86=E5=93=81):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E5=80=BC=E6=94=B9=E8=A1=8C=E5=86=85=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E5=B9=B6=E4=BF=AE=E5=A4=8D=E9=9A=90=E8=97=8F=E9=A1=B5?= =?UTF-8?q?=E7=AD=BE=20SKU=20=E8=A1=8C=E8=A3=81=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/plugin/virtual/product/Add.vue | 8 +-- .../productAdd/components/SpecStock.vue | 63 +++++++++---------- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/frontend/admin/src/pages/plugin/virtual/product/Add.vue b/frontend/admin/src/pages/plugin/virtual/product/Add.vue index b04c28cf8..aacf3454d 100644 --- a/frontend/admin/src/pages/plugin/virtual/product/Add.vue +++ b/frontend/admin/src/pages/plugin/virtual/product/Add.vue @@ -69,7 +69,6 @@ @handleBlur="handleBlur" @handleSelImg="handleSelImg" @handleRemoveImg="handleRemoveImg" - @handleShowPop="handleShowPop" @createAttr="createAttr" @handleAddRole="handleAddRole" @handleSaveAsTemplate="handleSaveAsTemplate" @@ -747,9 +746,6 @@ function handleSelImg(item) { function handleRemoveImg(item) { item.pic = ''; } -function handleShowPop(index) { - specStock.value.$refs['inputRef_' + index][0].focus(); -} function handleAddRole() { attrs.value.push({ value: formDynamic.value.attrsName, @@ -775,6 +771,7 @@ function handleSaveAsTemplate() { }) .catch(() => {}); } +// 添加属性(行内输入框回车/失焦触发,num 为空时忽略) function createAttr(num, idx) { if (num) { const isExist = attrs.value[idx].detail.some((item) => item.value === num); @@ -788,10 +785,7 @@ function createAttr(num, idx) { } else { generateAttr(attrs.value); } - specStock.value.$refs['popoverRef_' + idx][0].doClose(); clearAttr(); - } else { - specStock.value.$refs['popoverRef_' + idx][0].doClose(); } } function addOneAttr(val, val2) { diff --git a/frontend/admin/src/pages/product/productAdd/components/SpecStock.vue b/frontend/admin/src/pages/product/productAdd/components/SpecStock.vue index e35fe6b3d..99085d101 100644 --- a/frontend/admin/src/pages/product/productAdd/components/SpecStock.vue +++ b/frontend/admin/src/pages/product/productAdd/components/SpecStock.vue @@ -105,25 +105,18 @@ @@ -140,15 +133,8 @@ - - + +
- +
@@ -592,9 +578,8 @@