diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 768ffd45fb..1eb19ae4ac 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -5,7 +5,7 @@ @click="handleClick" @mousedown="elementMouseDown" > -
+
diff --git a/frontend/src/components/canvas/components/Editor/SettingMenu.vue b/frontend/src/components/canvas/components/Editor/SettingMenu.vue index b024abea35..3fe4ab34cc 100644 --- a/frontend/src/components/canvas/components/Editor/SettingMenu.vue +++ b/frontend/src/components/canvas/components/Editor/SettingMenu.vue @@ -46,24 +46,11 @@ export default { ]), methods: { edit() { - bus.$emit('change_panel_right_draw', true) - // // 编辑时临时保存 当前修改的画布 - // this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData)) - // this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData)) - // if (this.curComponent.type === 'view') { - // this.$store.dispatch('chart/setViewId', null) - // this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId) - // bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }}) - // } - // if (this.curComponent.type === 'custom') { - // bus.$emit('component-dialog-edit') - // } - // - // // 编辑样式组件 - // - // if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') { - // bus.$emit('component-dialog-style') - // } + if (this.curComponent.type === 'custom') { + bus.$emit('component-dialog-edit') + } else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') { + bus.$emit('component-dialog-style') + } else { bus.$emit('change_panel_right_draw', true) } }, lock() { this.$store.commit('lock') diff --git a/frontend/src/store/modules/chart.js b/frontend/src/store/modules/chart.js index 671deba0f4..b68f06f8f0 100644 --- a/frontend/src/store/modules/chart.js +++ b/frontend/src/store/modules/chart.js @@ -3,7 +3,7 @@ const getDefaultState = () => { sceneData: {}, table: {}, sceneId: {}, - viewId: {}, + viewId: null, tableId: {}, chartSceneData: {} }