From 63edb867668a9b0a7d112b75da40465fec175c66 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 29 Dec 2022 18:30:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B6=E8=97=8Ftab?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=87=B3=E4=BB=AA=E8=A1=A8=E6=9D=BFtab?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=B3=E4=BE=A7=E6=B2=A1=E6=9C=89=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/list/PanelMain.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/src/views/panel/list/PanelMain.vue b/frontend/src/views/panel/list/PanelMain.vue index e7b593d561..d04d24deb1 100644 --- a/frontend/src/views/panel/list/PanelMain.vue +++ b/frontend/src/views/panel/list/PanelMain.vue @@ -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') {