fix: 修复收藏tab切换至仪表板tab页面右侧没有内容显示

This commit is contained in:
wangjiahao
2022-12-29 18:30:01 +08:00
parent 686edb3456
commit 63edb86766

View File

@@ -77,6 +77,11 @@ export default {
if (newVal === 'PanelMain' && this.lastActiveNodeData) {
this.activeNodeAndClickOnly(this.lastActiveNodeData)
}
},
activeName: function(newVal, oldVal) {
if (newVal !== 'PanelMain') {
this.clear()
}
}
},
mounted() {
@@ -93,6 +98,15 @@ export default {
// this.clear()
},
methods: {
clear() {
// 清空
this.$store.dispatch('panel/setPanelInfo', {
id: null,
name: '',
preStyle: null
})
this.$store.dispatch('panel/setMainActiveName', 'PanelMain')
},
handleClick(tab, event) {
// 点击分析面板需要刷新分享内容
if (tab.name === 'panels_share') {