Merge pull request #4243 from dataease/pr@dev@fix_tab-switch

fix: 修复收藏tab切换至仪表板tab页面右侧没有内容显示
This commit is contained in:
王嘉豪
2022-12-29 18:32:53 +08:00
committed by GitHub

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') {