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(); },