From d048d0af8af826b4d8fe7147a8214cb8dee459c7 Mon Sep 17 00:00:00 2001 From: zqm Date: Sun, 4 Jan 2026 13:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E6=A1=86=E8=B0=83=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue index f92daab..8eab222 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue @@ -470,6 +470,10 @@ const onResizeStart = (e, direction) => { height: currentPosition.y - startPosition.y }; + // 定义最小尺寸常量 + const minWidth = 200; + const minHeight = 30; + // 根据方向正确计算新尺寸 let newWidth = areaStartState.width; let newHeight = areaStartState.height; @@ -492,6 +496,12 @@ const onResizeStart = (e, direction) => { newHeight = areaStartState.height + totalDelta.height; } + // 检查尺寸是否小于最小值,如果小于则不发送事件 + if (newWidth < minWidth || newHeight < minHeight) { + // 尺寸小于最小值,不发送事件,停止拖拽 + return; + } + const newSize = { width: newWidth, height: newHeight