Skip to content

Commit

Permalink
fix:同类型组件切换时,activeName不能正确切换。 (#122)
Browse files Browse the repository at this point in the history
修复同类型组件在点击切换时activeName不能响应式改变而导致属性设置面板中collapse卡片不能正确显示的问题。
  • Loading branch information
q664171689 authored Aug 1, 2023
1 parent 9b23a6e commit d2e9613
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/custom-component/common/CommonAttr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2e9613

Please sign in to comment.