From 8be040973e510cd9542f86f142ab9f40e6cddeff Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 5 Aug 2021 15:27:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E5=88=A0=E9=99=A4=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E7=9A=84=E5=90=8C=E6=97=B6=EF=BC=8C=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/list/PanelList.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 = {