refactor:删除仪表板的同时,清空画布数据

This commit is contained in:
wangjiahao 2021-08-05 15:27:09 +08:00
parent bef9dc2446
commit 8be040973e

View File

@ -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 = {