From 2fac9556c9be0a630d84ee30d936ec0929a7f90d Mon Sep 17 00:00:00 2001 From: guoapeng Date: Sat, 12 Jul 2025 20:54:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=96=B7=E6=B6=82=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E5=8F=AA=E5=85=81=E8=AE=B8=E4=B8=8A=E4=B8=8B=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/spray/trayGraph/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/spray/trayGraph/index.vue b/src/components/spray/trayGraph/index.vue index 4e55508..9ba59d0 100644 --- a/src/components/spray/trayGraph/index.vue +++ b/src/components/spray/trayGraph/index.vue @@ -62,6 +62,12 @@ const addSelect = () => { height: (75 - 15 * 2) * zoom, fill: 'rgba(238,10,36, 0.2)', draggable: true, + dragBoundFunc(pos) { + return { + x: 0, // X坐标保持不变 + y: pos.y, // 允许Y坐标变化 + } + }, }) // 在onMounted中rect创建后添加拖拽监听