From d718c19bedd5ebce941d1ae6bdfb6b796cc0196f Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 29 Mar 2022 17:01:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BC=B9=E6=A1=86=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Editor/ComponentWrapper.vue | 6 +++-- .../canvas/components/Editor/SettingMenu.vue | 23 ++++--------------- frontend/src/store/modules/chart.js | 2 +- 3 files changed, 10 insertions(+), 21 deletions(-) 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: {} }