From d2e9613959d676e1340d47263be3ba2243d4c7c5 Mon Sep 17 00:00:00 2001 From: q664171689 <61270660+q664171689@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:04:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=90=8C=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=87=E6=8D=A2=E6=97=B6=EF=BC=8CactiveNam?= =?UTF-8?q?e=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E3=80=82=20(#122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复同类型组件在点击切换时activeName不能响应式改变而导致属性设置面板中collapse卡片不能正确显示的问题。 --- src/custom-component/common/CommonAttr.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/custom-component/common/CommonAttr.vue b/src/custom-component/common/CommonAttr.vue index e24be83..fdbef32 100644 --- a/src/custom-component/common/CommonAttr.vue +++ b/src/custom-component/common/CommonAttr.vue @@ -57,6 +57,11 @@ export default { created() { this.activeName = this.curComponent.collapseName }, + watch: { + curComponent(){ + this.activeName = this.curComponent.collapseName + } + }, methods: { onChange() { this.curComponent.collapseName = this.activeName