From 3dedcb615b0b23ba30f0569e443bf58198e94dd2 Mon Sep 17 00:00:00 2001 From: yuantao Date: Thu, 16 Oct 2025 10:24:05 +0800 Subject: [PATCH] =?UTF-8?q?\"feat:=20=E8=B0=83=E6=95=B4=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=E9=98=88=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E7=9B=AE=E6=A0=87=E5=9B=BE=E7=89=87=E4=B8=89?= =?UTF-8?q?=E5=88=86=E4=B9=8B=E4=BA=8C=E9=AB=98=E5=BA=A6\"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RichTextEditor.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/RichTextEditor.vue b/src/components/RichTextEditor.vue index a396113..5a3213f 100644 --- a/src/components/RichTextEditor.vue +++ b/src/components/RichTextEditor.vue @@ -1048,7 +1048,8 @@ const checkAndSwapImages = (draggedImg, deltaY) => { const targetCenterY = targetRect.top + targetRect.height / 2 // 检查是否与目标图片重叠,使用更精确的碰撞检测 - const overlapThreshold = (draggedRect.height + targetRect.height) * 0.4 // 调整阈值使交换更灵敏 + // 当拖拽图片覆盖目标图片高度的三分之二时触发排序 + const overlapThreshold = targetRect.height * 0.67 const distance = Math.abs(draggedCenterY - targetCenterY) if (distance < overlapThreshold) {