fix(仪表板): 修复预览页面可能出现复选框的情况

This commit is contained in:
wangjiahao 2022-08-02 14:37:56 +08:00
parent f6ba0642ea
commit e78cd47933
2 changed files with 6 additions and 3 deletions

View File

@ -208,7 +208,8 @@ export default {
methods: {
close() {
//
this.clearCanvas()
this.$store.commit('initCanvasBase')
this.$store.commit('setInEditorStatus', false)
this.$emit('close-left-panel')
this.$nextTick(() => {
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
@ -373,7 +374,6 @@ export default {
clearCanvas() {
this.$store.commit('setComponentData', [])
this.$store.commit('recordSnapshot', 'clearCanvas')
this.$store.commit('setInEditorStatus', false)
},
handlePreviewChange() {

View File

@ -659,7 +659,7 @@ const data = {
setChangeProperties(state, propertyInfo) {
state.changeProperties[propertyInfo.custom][propertyInfo.property] = propertyInfo.value
},
initCanvas(state) {
initCanvasBase(state) {
this.commit('setCurComponent', { component: null, index: null })
this.commit('clearLinkageSettingInfo', false)
this.commit('resetViewEditInfo')
@ -676,6 +676,9 @@ const data = {
customStyle: {},
customAttr: {}
}
},
initCanvas(state) {
this.commit('initCanvasBase')
state.isInEditor = true
},
initViewRender(state, pluginViews) {