fix: 切换一级目录 清理原有仪表板信息

This commit is contained in:
wangjiahao 2021-06-16 15:50:01 +08:00
parent 216f722a99
commit 6bf2a4f8ae

View File

@ -55,7 +55,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.$store.dispatch('panel/setMainActiveName', 'PanelMain') this.clear()
}, },
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
@ -74,7 +74,17 @@ export default {
refreshEnshrine() { refreshEnshrine() {
this.showEnshrine = false this.showEnshrine = false
this.$nextTick(() => (this.showEnshrine = true)) this.$nextTick(() => (this.showEnshrine = true))
},
clear() {
//
this.$store.dispatch('panel/setPanelInfo', {
id: null,
name: '',
preStyle: null
})
this.$store.dispatch('panel/setMainActiveName', 'PanelMain')
} }
} }
} }
</script> </script>