diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index fd39afd240..43f1fcfda7 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -4,7 +4,9 @@ :class="{'gap_class':canvasStyleData.panel.gap==='yes'}" class="component" @click="handleClick" + @mousedown="elementMouseDown" > + { this[event](events[event]) }) + }, + elementMouseDown(e) { + debugger + // private 设置当前组件数据及状态 + this.$store.commit('setClickComponentStatus', true) + if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-number-range') { + e.preventDefault() + } + // 阻止冒泡事件 + e.stopPropagation() + this.$store.commit('setCurComponent', { component: this.config, index: this.index }) } } } diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 5b8fcbd1c9..9b6728fbf5 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -1,5 +1,5 @@