From e2626d0423d2ba090be0e3c750eb8b3213ea84d9 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sun, 10 Oct 2021 20:58:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E5=92=8C=E6=82=AC=E6=B5=AE=E7=9B=B8=E4=BA=92=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DeDrag/index.vue | 5 +++- .../canvas/components/Editor/EditBar.vue | 25 ++++++++++++++++--- .../canvas/components/Editor/index.vue | 4 +-- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index e0cf9c2d1e..49dc0f7295 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -21,7 +21,7 @@ @mouseenter="enter" @mouseleave="leave" > - +
{ + this.recordMatrixCurShadowStyle() + }, 50) this.$store.state.styleChangeTimes++ bus.$emit('auxiliaryMatrixChange') }, + // 记录当前样式 跟随阴影位置 矩阵处理 + recordMatrixCurShadowStyle() { + // debugger + const left = (this.curComponent.x - 1) * this.curCanvasScale.matrixStyleWidth + const top = (this.curComponent.y - 1) * this.curCanvasScale.matrixStyleHeight + const width = this.curComponent.sizex * this.curCanvasScale.matrixStyleWidth + const height = this.curComponent.sizey * this.curCanvasScale.matrixStyleHeight + const style = { + left: left, + top: top, + width: width, + height: height + } + this.$store.commit('setShapeStyle', style) + // resize + this.$emit('resizeView') + }, edit() { // 编辑时临时保存 当前修改的画布 this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData)) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 57d95d9558..c20deb0ce8 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -13,9 +13,9 @@ @scroll="canvasScroll" > - + - +