Merge pull request #2734 from dataease/pr@dev@fix_panel-edit

fix(仪表板): 修复目录也可以通过预览编辑按钮进入仪表板编辑页面的问题
This commit is contained in:
王嘉豪 2022-07-29 11:55:30 +08:00 committed by GitHub
commit 8ef554c5be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,8 +374,7 @@ export default {
bus.$off('newPanelFromMarket', this.newPanelFromMarket)
},
mounted() {
this.$store.commit('setComponentData', [])
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
this.clearCanvas()
this.defaultTree(true)
this.initCache()
const routerParam = this.$router.currentRoute.params
@ -845,7 +844,9 @@ export default {
this.searchType = searchTypeInfo
},
editFromPanelViewShow() {
this.edit(this.lastActiveNodeData, this.lastActiveNode)
this.$store.commit('setComponentData', [])
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
},
editPanelBashInfo(params) {
if (params.operation === 'status') {