From 63ef5ab3f6bbfebb2f103454cc745293348e4067 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 16 Jun 2021 17:28:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E3=80=91=E9=9D=9E=E8=87=AA=E9=80=82=E5=BA=94=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=EF=BC=8C=E8=A7=86=E5=9B=BE=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=87=BA=E7=8E=B0=E7=9A=84=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 95865b38a7..e5ac674f86 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -375,8 +375,13 @@ export default { let left = 0 // 如果档期有计划的组件 坐标取当前组件的加上偏移量 if (this.curComponent && !target.className.includes('editor')) { - top = this.curComponent.style.top * this.scaleHeight / 100 + e.offsetY - left = this.curComponent.style.left * this.scaleWidth / 100 + e.offsetX + if (this.canvasStyleData.selfAdaption) { + top = this.curComponent.style.top * this.scaleHeight / 100 + e.offsetY + left = this.curComponent.style.left * this.scaleWidth / 100 + e.offsetX + } else { + top = this.curComponent.style.top + e.offsetY + left = this.curComponent.style.left + e.offsetX + } } else { // 计算菜单相对于编辑器的位移 top = e.offsetY