From 0d5162e27266fc79242682ebc2bdfea4f807acb0 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 28 Feb 2024 17:38:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BF=AB=E9=80=9F=E4=BA=A4=E6=9B=BF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=87=8D=E5=8F=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/editor/Shape.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/frontend/src/components/canvas/components/editor/Shape.vue b/core/frontend/src/components/canvas/components/editor/Shape.vue index eff4fc7a77..81dd9f2f46 100644 --- a/core/frontend/src/components/canvas/components/editor/Shape.vue +++ b/core/frontend/src/components/canvas/components/editor/Shape.vue @@ -263,7 +263,13 @@ export default { // 如果元素没有移动,则不保存快照 let hasMove = false + let isFirst = true const move = (moveEvent) => { + // 因此第一次点击时不触发 move 事件 防止快速交替出现的重叠问题 + if (isFirst) { + isFirst = false + return + } hasMove = true const curX = moveEvent.clientX const curY = moveEvent.clientY