style: 精简主题提示并优化分镜工具栏与分隔线

This commit is contained in:
GouJ
2026-09-02 10:03:10 +08:00
parent 4229426339
commit a125164103
10 changed files with 205 additions and 98 deletions
+4 -4
View File
@@ -47,13 +47,13 @@ function contrast(foreground: string, background: string) {
}
describe('微信风格明暗主题', () => {
it('浅色 Tabs 分隔线与页面内容表面保持可辨识的灰阶差异', () => {
it('浅色 Tabs 分隔线使用约定的 #dadada与页面内容表面保灰阶差异', () => {
const { overrides } = setup()
const color = overrides.value.Tabs!.tabBorderColor!
if (typeof color !== 'string') throw new Error('Tabs 分隔线颜色必须为字符串')
expect(color).toBe('#bfbfbf')
expect(contrast(color, '#ededed')).toBeGreaterThan(1.5)
expect(contrast(color, '#ffffff')).toBeGreaterThan(1.5)
expect(color).toBe('#dadada')
expect(contrast(color, '#ededed')).toBeGreaterThan(1.15)
expect(contrast(color, '#ffffff')).toBeGreaterThan(1.15)
})
it('默认跟随系统并实时响应,销毁时移除监听', async () => {
+1 -1
View File
@@ -216,7 +216,7 @@ export function useTheme() {
tabTextColorHoverLine: accentText,
barColor: primary,
// Tabs 保留横向分隔线,明确导航与内容边界;选中下划线仍使用主绿色。
tabBorderColor: dark ? '#333333' : '#bfbfbf'
tabBorderColor: dark ? '#333333' : '#dadada'
},
Tag: {
textColorPrimary: accentText,