From c298d7ba2dfaa261cac4a53cd73adcd86c12d55b Mon Sep 17 00:00:00 2001 From: zqm Date: Fri, 14 Nov 2025 14:23:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BB=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E8=BE=B9=E7=BC=98=E6=8C=87=E7=A4=BA=E5=99=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改DockLayout.vue中的hideEdgeIndicators判断逻辑,从简单检查floatingAreas数组改为实际检测主区域内容区内是否包含其他Area - 添加checkMainContentForAreas函数,通过DOM查询检测主区域内的.vs-area、.tab-page和.panel元素 - 添加onMounted钩子和floatingAreas监听器,确保在适当时机进行检测 - 保持DockIndicator.vue中v-if条件渲染边缘指示器的逻辑 - 修复第3条需求:当主区域内没有其他Area时正确隐藏外部边缘指示器 --- .../Web/src/DockLayout/DockIndicator.vue | 34 +++------ .../Robot/Web/src/DockLayout/DockLayout.vue | 74 ++++++++++++++++++- .../Robot/Web/src/DockLayout/ToDoList.md | 3 +- 3 files changed, 84 insertions(+), 27 deletions(-) diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/DockIndicator.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/DockIndicator.vue index 839f9a6..370349d 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/DockIndicator.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/DockIndicator.vue @@ -69,6 +69,7 @@ import { computed, watch, ref, onUnmounted } from 'vue' -// Props定义 const props = defineProps({ - // 是否可见 - visible: { - type: Boolean, - default: false - }, - // 目标区域的位置和大小信息 - targetRect: { - type: Object, - default: () => ({ - left: 0, - top: 0, - width: 0, - height: 0 - }) - }, - // 鼠标位置 - mousePosition: { - type: Object, - default: () => ({ - x: 0, - y: 0 - }) - } + visible: Boolean, + targetRect: Object, + mousePosition: Object, + hideEdgeIndicators: Boolean }) -// 鼠标悬停在哪个指示器上 +// 创建响应式的hoveredZone状态 const hoveredZone = ref(null) // 鼠标是否悬停在中心指示器上(用于控制中心指示区的显示) const isCenterIndicatorHovered = ref(false) diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/DockLayout.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/DockLayout.vue index 127623b..53eacdf 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/DockLayout.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/DockLayout.vue @@ -6,12 +6,14 @@ :visible="showDockIndicator" :target-rect="targetAreaRect" :mouse-position="currentMousePosition" + :hide-edge-indicators="hideEdgeIndicators" @zone-active="onDockZoneActive" style="z-index: 9999;" /> +