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
commit a4302bb8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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