fix: 修复新增chart选择非1级panel后跳转失败问题

This commit is contained in:
陈劲松
2021-01-13 15:27:17 +08:00
committed by chenjinsong
parent 0be7276858
commit 5f1867894b
2 changed files with 30 additions and 5 deletions

View File

@@ -45,7 +45,7 @@
placement: {type: String},
isEdit: {type: Boolean, default: true},
panelData: {type: Array},
showPanel: {type: Number},
showPanel: {type: Object},
panelLock: {type: Boolean, default: true},
filterPanel: {type: String},
},
@@ -58,6 +58,14 @@
handler(n) {
this.$refs.panelTree && this.$refs.panelTree.filter(n);
}
},
showPanel: {
immediate: true,
handler(n) {
if (n && n.id) {
this.$refs.panelTree.setCurrentKey(this.showPanel);
}
}
}
},
data(){
@@ -120,6 +128,7 @@
selectPanel(data, checked, child) {
this.panel = data;
this.$emit('selectPanel', this.panel);
this.$refs.panelTree.setCurrentKey(this.panel);
this.esc();
},
//tree设为单选