Commit aa0953d6 by liimin

fix(组件): 修复浮层z-index冲突并优化工具箱样式与交互

- 调整 FinishStep 和 ToolBox 组件的 un-popup z-index 值,避免层级覆盖问题
- 优化 ToolBox 浮层样式,改为毛玻璃效果并移除冗余标题栏代码
- 改进浮动按钮的视觉设计,使用蓝色主题并添加触摸事件处理
- 调整面板内按钮布局与样式,提升视觉一致性和操作反馈
1 parent 0cbf48ae
......@@ -4,7 +4,7 @@
:mode="isLandscapeMode ? 'right' : 'bottom'"
:round="isLandscapeMode ? 0 : 20"
:closeable="true"
:z-index="10074"
:z-index="10075"
@close="close">
<view class="popup-wrapper" :class="isLandscapeMode ? 'landscape-wrapper' : 'portrait-wrapper'">
<!-- 标题栏 -->
......
<template>
<view class="tool-box" :style="toolBoxVars">
<un-popup :show="show" :mode="isLandscapeMode ? 'right' : 'bottom'" :round="isLandscapeMode ? 0 : 20" @close="hide" :closeable="true" >
<un-popup :z-index="10073" :show="show" :mode="isLandscapeMode ? 'right' : 'bottom'" :round="isLandscapeMode ? 0 : 20" @close="hide" :closeable="true" bg-color="transparent">
<view class="list-wrapper" :class="isLandscapeMode ? 'landscape-wrapper' : 'portrait-wrapper'">
<!-- <view class="panel-head">
<view class="panel-close" @click="hide">
<text class="panel-close-text">×</text>
</view>
</view> -->
<view class="panel-body">
<view class="section-title-row section-title-row--mt">
<text class="section-title">快捷操作</text>
......@@ -66,12 +61,16 @@
inactive-icon="folder"
:offset-right="20"
:offset-top="120"
position="top-center"
position="right-center"
:size="56"
type="primary"
@click="handleFabClick">
<template #trigger>
<view class="custom-trigger">
<view class="custom-trigger"
@touchstart="handleTriggerTouchStart"
@touchmove="handleTriggerTouchMove"
@touchend="handleTriggerTouchEnd"
@touchcancel="handleTriggerTouchEnd">
<un-icon name="folder" size="24" color="#fff"></un-icon>
<text class="trigger-text">文件夹</text>
</view>
......@@ -397,8 +396,10 @@ const handleTriggerTouchMove = (event: TouchEvent): void => {
return;
}
const point = readTouchPoint(event);
const deltaX = point[0] - dragStartX.value;
const deltaY = point[1] - dragStartY.value;
if (Math.abs(deltaY) > 2) {
// 只要 x 或 y 方向滑动超过 2px,就认为是拖动,阻止点击
if (Math.abs(deltaY) > 2 || Math.abs(deltaX) > 2) {
triggerMoved.value = true;
}
const fabSize = visualFabSize.value;
......@@ -492,20 +493,20 @@ defineExpose({
.custom-trigger {
width: 56px;
height: 56px;
background: linear-gradient(145deg, rgba(38, 45, 59, 0.95), rgba(52, 62, 82, 0.9));
background: rgba(22, 119, 255, 0.85);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: -4px 8px 24px rgba(0, 0, 0, 0.25), inset 1px 1px 2px rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 16px rgba(22, 119, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
border: 1px solid rgba(255, 255, 255, 0.2);
flex-direction: column;
transition: transform 0.22s ease, box-shadow 0.22s ease;
transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
.trigger-text {
position: relative;
font-size: 11px;
color: #e2e8f0;
color: #ffffff;
text-align: center;
white-space: normal;
width: 34px;
......@@ -517,8 +518,8 @@ defineExpose({
}
.custom-trigger-active {
transform: scale(0.96);
box-shadow: -2px 4px 12px rgba(0, 0, 0, 0.3), inset 1px 1px 4px rgba(255, 255, 255, 0.05);
transform: scale(0.92);
box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.list-wrapper {
......@@ -528,45 +529,19 @@ defineExpose({
padding: var(--fab-panel-padding-v) var(--fab-panel-padding-h);
margin-bottom: 0;
align-items: stretch;
// border-radius: 10px 0 0 10px;
background: linear-gradient(145deg, rgba(30, 36, 48, 0.95), rgba(42, 50, 66, 0.92));
width: var(--panel-width);
height: 100%; /* 撑满侧边栏高度 */
}
.panel-head {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: space-between;
height: 32px;
padding: 0 4px 0 8px;
margin-bottom: 4px;
}
.panel-title {
font-size: 13px;
font-weight: 600;
color: #e2e8f0;
letter-spacing: 0.5px;
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px);
}
.panel-close {
width: 24px;
height: 24px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.05);
.landscape-wrapper {
width: var(--panel-width);
height: 100%;
}
.panel-close-text {
font-size: 16px;
font-weight: 400;
color: #94a3b8;
line-height: 16px;
.portrait-wrapper {
width: 100%;
min-height: 100%;
padding-bottom: env(safe-area-inset-bottom, 24px);
}
.panel-body {
......@@ -591,7 +566,7 @@ defineExpose({
font-size: 11px;
font-weight: bold;
letter-spacing: 0.5px;
color: rgba(255, 255, 255, 0.45);
color: rgba(0, 0, 0, 0.45);
}
.dynamic-group {
......@@ -605,7 +580,7 @@ defineExpose({
display: flex;
flex-direction: column;
padding: 8px 0 4px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
width: 100%;
}
......@@ -621,7 +596,7 @@ defineExpose({
display: flex;
flex-direction: column;
margin-bottom: 12px;
width: 33.33%; /* 统一为 3个一行 */
width: 33.33%;
}
.fab-item {
......@@ -641,18 +616,19 @@ defineExpose({
.icon-box {
position: relative;
width: 38px;
height: 38px;
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
background: linear-gradient(180deg, rgba(240, 244, 255, 0.96), rgba(220, 230, 248, 0.92));
width: 44px;
height: 44px;
border-radius: 14px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.5);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
flex-shrink: 0;
/* image 上禁止 flex 对齐属性,由外层 .icon-box 居中 */
.btn-icon {
position: absolute;
top: 0;
......@@ -676,19 +652,15 @@ defineExpose({
justify-content: center;
z-index: 1;
}
.item-text {
display: none;
}
}
.item-text {
margin-left: 0;
margin-top: 6px;
font-size: 10px;
color: rgba(255, 255, 255, 0.85);
margin-top: 8px;
font-size: 11px;
color: #333333;
font-weight: 500;
line-height: 12px;
line-height: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......@@ -703,11 +675,13 @@ defineExpose({
}
.fixed-pay {
background: linear-gradient(180deg, #f3f7ff, #cedcf1);
background: linear-gradient(135deg, rgba(230, 240, 255, 0.8), rgba(200, 220, 255, 0.6));
border-color: rgba(255, 255, 255, 0.8);
}
.fixed-finish {
background: linear-gradient(180deg, #fff7ee, #e7d7c6);
background: linear-gradient(135deg, rgba(255, 240, 230, 0.8), rgba(255, 220, 200, 0.6));
border-color: rgba(255, 255, 255, 0.8);
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!