feat: 全站视觉焕新与悬浮玻璃 TabBar 迁移

This commit is contained in:
2026-08-07 23:29:19 +08:00
parent 19408e5a8c
commit 61f1217384
97 changed files with 4007 additions and 2024 deletions
+126 -76
View File
@@ -1,37 +1,65 @@
.sticker-edit-page {
padding: 0 24px 24px;
padding: 0 32rpx calc(48rpx + env(safe-area-inset-bottom));
min-height: 100vh;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
/* 顶部导航 */
.edit-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: calc(env(safe-area-inset-top, 0px) + 24px) 0 24px;
gap: 16rpx;
padding-bottom: 24rpx;
}
.edit-back {
font-size: 36px;
display: flex;
align-items: center;
justify-content: center;
width: 80rpx;
height: 80rpx;
flex-shrink: 0;
border-radius: 50%;
background: var(--bg-card);
border: 1rpx solid var(--border-strong);
box-shadow: var(--shadow-card);
font-size: 36rpx;
line-height: 1;
color: var(--text-primary);
width: 60px;
}
.edit-back:active {
transform: scale(0.96);
}
.edit-title {
font-size: 34px;
flex: 1;
min-width: 0;
text-align: center;
font-size: 34rpx;
font-weight: 700;
color: var(--text-primary);
text-align: center;
flex: 1;
letter-spacing: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.edit-save {
font-size: 28px;
color: var(--accent-primary);
display: flex;
align-items: center;
justify-content: flex-end;
min-width: 80rpx;
font-size: 26rpx;
font-weight: 600;
width: 60px;
text-align: right;
color: var(--accent-primary);
}
.edit-save:active {
opacity: 0.85;
}
/* 画布区域 */
@@ -40,27 +68,30 @@
display: flex;
align-items: center;
justify-content: center;
padding: 20px 0;
min-height: 400px;
padding: 8rpx 0 24rpx;
min-height: 480rpx;
}
.edit-canvas {
width: 100%;
height: 500px;
height: 480rpx;
background: var(--bg-input);
border-radius: 16px;
border-radius: 24rpx;
border: 1rpx solid var(--border-strong);
box-shadow: var(--shadow-card);
}
/* 工具面板 */
.edit-tools {
padding: 32px;
padding: 24rpx;
}
.edit-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32px;
gap: 24rpx;
margin-bottom: 24rpx;
}
.edit-row:last-child {
@@ -68,76 +99,36 @@
}
.edit-label {
font-size: 28px;
font-weight: 500;
font-size: 26rpx;
font-weight: 600;
color: var(--text-primary);
width: 120px;
width: 96rpx;
flex-shrink: 0;
}
.slider-wrap {
flex: 1;
display: flex;
align-items: center;
gap: 16px;
}
.slider-track {
flex: 1;
height: 8px;
border-radius: 4px;
background: var(--bg-input);
position: relative;
}
.slider-fill {
height: 100%;
border-radius: 4px;
background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-soft));
position: absolute;
left: 0;
top: 0;
}
.slider-thumb {
width: 32px;
height: 32px;
border-radius: 50%;
background: #fff;
border: 4px solid var(--accent-primary);
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.slider-value {
font-size: 24px;
color: var(--text-secondary);
min-width: 60px;
text-align: right;
}
/* 快速操作按钮 */
.edit-quick-actions {
display: flex;
gap: 16px;
gap: 16rpx;
flex-wrap: wrap;
}
.quick-btn {
padding: 16px 28px;
border-radius: 40px;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
height: 64rpx;
padding: 0 28rpx;
border-radius: 999rpx;
font-size: 24rpx;
font-weight: 500;
background: var(--bg-input);
color: var(--text-primary);
border: 1rpx solid var(--border);
transition: all 0.2s;
transition: all 0.2s ease;
}
.quick-btn:active {
opacity: 0.8;
opacity: 0.85;
transform: scale(0.97);
}
@@ -147,13 +138,67 @@
color: var(--accent-primary);
}
/* 底部操作栏 — 毛玻璃规则由全局 .action-bar 提供 */
/* 滑块 */
.slider-wrap {
flex: 1;
display: flex;
align-items: center;
gap: 12rpx;
min-width: 0;
}
.slider-track {
flex: 1;
height: 8rpx;
border-radius: 999rpx;
background: var(--bg-input);
border: 1rpx solid var(--border);
position: relative;
min-width: 0;
}
.slider-fill {
height: 100%;
border-radius: 999rpx;
background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-soft));
position: absolute;
left: 0;
top: 0;
}
.slider-thumb {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: var(--bg-card);
border: 4rpx solid var(--accent-primary);
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
box-shadow: var(--shadow-card);
}
.slider-thumb.dragging {
transform: translate(-50%, -50%) scale(1.12);
}
.slider-value {
font-size: 22rpx;
color: var(--text-secondary);
min-width: 80rpx;
text-align: right;
font-variant-numeric: tabular-nums;
}
/* 底部操作栏 — 毛玻璃由 BottomActionBar 提供 */
.edit-footer .btn-primary,
.edit-footer .btn-secondary {
flex: 1;
text-align: center;
padding: 24px 0;
font-size: 28px;
padding: 28rpx 0;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
}
/* 加载遮罩 */
@@ -163,7 +208,7 @@
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.4);
background: rgba(0, 0, 0, 0.45);
z-index: 1000;
display: flex;
align-items: center;
@@ -172,7 +217,12 @@
}
.edit-loading-text {
font-size: 28px;
font-size: 28rpx;
color: #fff;
margin-top: 20px;
margin-top: 20rpx;
}
/* 局部间距 */
.mt-20 {
margin-top: 24rpx;
}
+4 -3
View File
@@ -8,6 +8,7 @@ import { useThemeContext } from '../../../context/ThemeContext'
import { useSafeArea } from '../../../hooks/useSafeArea'
import { useStatusBar } from '../../../hooks/useStatusBar'
import ThemedPageMeta from '../../../components/ThemedPageMeta'
import BottomActionBar from '../../../components/BottomActionBar'
/* ============================================================
使用 Canvas 实现贴纸编辑(亮度/色相/线稿)
@@ -324,7 +325,7 @@ export default function StickerEditPage() {
id='editCanvas'
type='2d'
className='edit-canvas'
style={{ width: '100%', height: '400px' }}
style={{ width: '100%', height: '480rpx' }}
/>
</View>
@@ -415,14 +416,14 @@ export default function StickerEditPage() {
<View style={{ flex: 1 }} />
<View className='action-bar edit-footer'>
<BottomActionBar className='edit-footer'>
<View className='btn-secondary' onTap={() => Taro.navigateBack()}>
<Text></Text>
</View>
<View className='btn-primary' onTap={handleSave}>
<Text></Text>
</View>
</View>
</BottomActionBar>
<View className='safe-bottom-placeholder' />