独立中心指示器层级修正

- 修正 center-main-indicator z-index 从 10 更新为 10000
- 确保独立中心指示器位于 center-dock-container 上层
- 删除残留的 indicator-center 样式定义
- 更新文档中的 z-index 说明和层级结构图
- 清理代码并同步文档描述
This commit is contained in:
zqm
2025-11-14 15:18:02 +08:00
parent c298d7ba2d
commit 624a04ec69
3 changed files with 102 additions and 57 deletions

View File

@@ -408,30 +408,31 @@
d="M10 14 L19 14 L19 30 L10 30 Z" />
</svg>
<!-- 中心指示器根据activeDockZone状态显示和高亮添加鼠标事件处理 -->
<svg
width="41"
height="41"
viewBox="0 0 40 40"
aria-hidden="true"
class="indicator-center"
:class="{ 'active': activeDockZone === 'center' }"
@mouseenter="handleMouseEnter('center')"
@mouseleave="handleMouseLeave"
>
<use xlink:href="#shared-border" />
<path
fill="#4C5E83"
fill-rule="evenodd"
clip-rule="evenodd"
d="M8 8 L32 8 L32 31 L31 32 L9 32 L8 31 Z" />
<path
fill="url(#Area)"
fill-rule="evenodd"
clip-rule="evenodd"
d="M10 14 L30 14 L30 30 L10 30 Z" />
</svg>
</div>
<!-- 中心指示器独立于中心区域容器位于容器正中央 -->
<svg
width="41"
height="41"
viewBox="0 0 40 40"
aria-hidden="true"
class="center-main-indicator"
:class="{ 'active': activeDockZone === 'center' }"
@mouseenter="handleMouseEnter('center')"
@mouseleave="handleMouseLeave"
>
<use xlink:href="#shared-border" />
<path
fill="#4C5E83"
fill-rule="evenodd"
clip-rule="evenodd"
d="M8 8 L32 8 L32 31 L31 32 L9 32 L8 31 Z" />
<path
fill="url(#Area)"
fill-rule="evenodd"
clip-rule="evenodd"
d="M10 14 L30 14 L30 30 L10 30 Z" />
</svg>
</div>
</template>
@@ -892,10 +893,15 @@ watch(activeDockZone, (newZone) => {
z-index: 2; /* 确保在中心指示区上方 */
}
/* 中心指示器:较小的图标,显示在中心指示区上层 */
.indicator-center {
position: relative;
z-index: 2; /* 确保在中心指示区上方 */
/* 注意indicator-center 类已被移除,现在使用 center-main-indicator */
/* 独立中心指示器:位于与中心区域容器同级的正中央位置 */
.center-main-indicator {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10000; /* 确保在中心区域容器上方 */
opacity: 0.7; /* 默认半透明 */
transition: all 0.2s; /* 应用到所有属性的过渡 */
}
@@ -917,10 +923,15 @@ watch(activeDockZone, (newZone) => {
opacity: 1; /* 完全不透明 */
transform: translateY(-50%) scale(1.1); /* 保持垂直居中的同时放大 */
}
.indicator-center.active {
/* 注意:indicator-center 类已被移除,现在使用 center-main-indicator */
/* 注意:.indicator-center.active 样式已被移除 */
/* 独立中心指示器的活动状态样式 */
.center-main-indicator.active {
opacity: 1; /* 完全不透明 */
transform: scale(1.1); /* 只放大,不改变位置 */
transform: translate(-50%, -50%) scale(1.1); /* 保持居中位置的同时放大 */
}
/* 中心指示区内部指示器的活动状态样式 */
.indicator-center-top.active {
opacity: 1; /* 完全不透明 */