diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index 8b42d39483..d7b5c99bda 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -463,6 +463,7 @@ export default { message: this.$t('panel.delete_success'), showClose: true }) + this.clearCanvas() this.tree(this.groupForm) this.defaultTree() }) @@ -470,6 +471,17 @@ export default { }) }, + clearCanvas() { + // 清空当前缓存,快照 + this.$store.commit('setComponentData', []) + this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING) + this.$store.dispatch('panel/setPanelInfo', { + id: null, + name: '', + preStyle: null + }) + }, + close() { this.editGroup = false this.groupForm = {