fix(dark): 调亮暗黑色调 + dock 跟随暗黑切换 + 图标文字放大
- 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>
This commit is contained in:
@@ -144,6 +144,11 @@ Page({
|
||||
// Tab page without method: re-apply via themeMod
|
||||
try { themeMod.applyThemeToPage(p) } catch (e) {}
|
||||
}
|
||||
// 自定义 tabBar 不在 pages 里,单独通知它切换暗黑/明亮
|
||||
try {
|
||||
const tb = p.getTabBar && p.getTabBar()
|
||||
if (tb && typeof tb.updateTheme === 'function') tb.updateTheme()
|
||||
} catch (e) {}
|
||||
})
|
||||
themeMod.applyThemeToPage(this)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user