From 4541f97faff481e6818cc0d5dc9b25119fd80140 Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Mon, 13 Oct 2025 15:59:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=96=B0=E5=A2=9E=E4=B9=8B=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E6=AC=A1=E7=82=B9=E5=87=BB=E5=B1=9E=E6=80=A7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=98=E5=9C=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除重复的 id 字段定义 - 优化表单重置方法,使用深拷贝确保数据正确重置 --- .../detail/components/metadata/PropertyGroupDrawer.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web-antd/src/views/device/product/detail/components/metadata/PropertyGroupDrawer.vue b/apps/web-antd/src/views/device/product/detail/components/metadata/PropertyGroupDrawer.vue index 86a3ddc..6255982 100644 --- a/apps/web-antd/src/views/device/product/detail/components/metadata/PropertyGroupDrawer.vue +++ b/apps/web-antd/src/views/device/product/detail/components/metadata/PropertyGroupDrawer.vue @@ -22,7 +22,6 @@ import PropertySelectionModal from './PropertySelectionModal.vue'; interface PropertyGroupData { id: string; name: string; - id: string; sort: number; description: string; properties: any[]; @@ -106,8 +105,10 @@ const propertyColumns = [ // 重置表单 const resetForm = () => { - formData.value = { ...defaultPropertyGroupData }; - formRef.value?.resetFields(); + Object.assign( + formData.value, + JSON.parse(JSON.stringify(defaultPropertyGroupData)), + ); }; // 监听数据变化