d5121d349f
- theme/app.wxss: 暗黑背景 #0F0F12->#2C2C2E,卡片 #1C1C1E->#3A3A3C, bg-soft/border 同步提亮,拉开卡片与背景对比(原太黑看不到卡片) - custom-tab-bar: dock 注册 wx.onThemeChange,系统切暗黑/明亮实时跟随 (组件不在 getCurrentPages,app.js watchDarkMode 通知不到) - custom-tab-bar: 新增 updateTheme,settings 手动切深色时通知 dock - custom-tab-bar.wxss: dock 图标 44->50rpx,文字 20->23rpx,未激活 opacity 0.5->0.7(更醒目) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
74 lines
1.4 KiB
Plaintext
74 lines
1.4 KiB
Plaintext
.dock {
|
|
position: fixed;
|
|
bottom: calc(40rpx + env(safe-area-inset-bottom));
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: calc(100% - 80rpx);
|
|
max-width: 600rpx;
|
|
z-index: 100;
|
|
}
|
|
|
|
.dock-inner {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
background: var(--card-bg, #FFFFFF);
|
|
border-radius: 100rpx;
|
|
padding: 12rpx 0;
|
|
box-shadow:
|
|
0 8rpx 32rpx rgba(0, 0, 0, 0.12),
|
|
0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.dock-item {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8rpx 0;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.dock-item:active {
|
|
transform: scale(0.92);
|
|
}
|
|
|
|
.dock-icon {
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
background-size: contain;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
margin-bottom: 5rpx;
|
|
opacity: 0.7;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.dock-text {
|
|
font-size: 23rpx;
|
|
color: var(--text-secondary, #999);
|
|
line-height: 1;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.dock-item.active .dock-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.dock-item.active .dock-text {
|
|
color: var(--primary, #FF6B35);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* dark mode */
|
|
@media (prefers-color-scheme: dark) {
|
|
.dock-inner {
|
|
background: var(--card-bg, #1C1C1E);
|
|
box-shadow:
|
|
0 8rpx 32rpx rgba(0, 0, 0, 0.5),
|
|
0 2rpx 8rpx rgba(0, 0, 0, 0.3);
|
|
}
|
|
}
|