refactor:删除仪表板的同时,清空画布数据
This commit is contained in:
parent
bef9dc2446
commit
8be040973e
@ -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 = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user