From 821fb4aacc7b456f640c419d2b2ea5d4bf7569eb Mon Sep 17 00:00:00 2001 From: xiaohuang <1559741705@qq.com> Date: Sun, 31 Mar 2024 10:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=81=E7=B1=BB=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CheckAttribute/index.vue | 14 ++++++++++++++ src/components/CheckAttributeGroup/index.vue | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/components/CheckAttribute/index.vue b/src/components/CheckAttribute/index.vue index 4bc9a39..5d6397d 100644 --- a/src/components/CheckAttribute/index.vue +++ b/src/components/CheckAttribute/index.vue @@ -94,6 +94,20 @@ export default { default: [] } }, + + + watch: { + value: { + handler(val){ + if (val.toString() !== this.attributeIdList.toString()){ + this.attributeIdList = val; + this.checkedAttributeList = [] + } + }, + immediate :true, + } + }, + data(){ return{ attributeIdList: [], diff --git a/src/components/CheckAttributeGroup/index.vue b/src/components/CheckAttributeGroup/index.vue index b66c15c..2945f3a 100644 --- a/src/components/CheckAttributeGroup/index.vue +++ b/src/components/CheckAttributeGroup/index.vue @@ -94,6 +94,8 @@ export default { default: [] } }, + + data(){ return{ attributeGroupIdList: [], @@ -109,6 +111,18 @@ export default { } }, + watch: { + value: { + handler(val){ + if (val.toString() !== this.attributeGroupIdList.toString()){ + this.attributeGroupIdList = val; + this.checkedAttributeGroupList = [] + } + }, + immediate :true, + } + }, + created() { this.queryAttributeGroup(); },