diff --git a/src/components/CheckAttribute/index.vue b/src/components/CheckAttribute/index.vue index cb5814a..45d1076 100644 --- a/src/components/CheckAttribute/index.vue +++ b/src/components/CheckAttribute/index.vue @@ -72,6 +72,17 @@ 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 f6a3c2b..948298f 100644 --- a/src/components/CheckAttributeGroup/index.vue +++ b/src/components/CheckAttributeGroup/index.vue @@ -82,6 +82,17 @@ export default { attributeGroupList: [] } }, + watch: { + value: { + handler(val) { + if (val.toString() !== this.attributeGroupIdList.toString()){ + this.attributeGroupIdList = val; + this.checkedAttributeGroupList = [] + } + }, + immediate: true, + }, + }, created() { this.queryAttributeGroup(); }, diff --git a/src/components/CheckBrand/index.vue b/src/components/CheckBrand/index.vue index 4e15946..f229487 100644 --- a/src/components/CheckBrand/index.vue +++ b/src/components/CheckBrand/index.vue @@ -82,6 +82,17 @@ export default { brandList: [] } }, + watch: { + value: { + handler(val) { + if (val.toString() !== this.brandIdList.toString()){ + this.brandIdList = val; + this.checkedBrandList = [] + } + }, + immediate: true, + }, + }, created() { this.queryBrand(); },