style: 统一导航与目录的直角满行布局

This commit is contained in:
GouJ
2026-09-01 19:18:00 +08:00
parent 565442c9b1
commit ad37c8ab7c
6 changed files with 44 additions and 10 deletions
+8 -1
View File
@@ -113,7 +113,14 @@ describe('微信风格明暗主题', () => {
errorColor: tokens.danger
})
expect(Layout).toMatchObject({ color: tokens.body, headerColor: tokens.surface, siderColor: tokens.subtle })
expect(Menu).toMatchObject({ itemColorActive: tokens.selected, itemTextColorActive: tokens['accent-text'] })
expect(Menu).toMatchObject({
borderRadius: '0px',
itemColorActive: tokens.selected,
itemColorActiveCollapsed: tokens.selected,
itemTextColorActive: tokens['accent-text']
})
// 圆角调整只用于导航,表单、普通按钮和弹窗仍保留原有主题。
expect(common?.borderRadius).toBe('6px')
expect(Button?.textColorPrimary).toBe(tokens['on-accent'])
for (const background of [common!.primaryColor!, common!.primaryColorHover!, common!.primaryColorPressed!]) {
expect(contrast(String(Button!.textColorPrimary), background)).toBeGreaterThanOrEqual(4.5)
+2
View File
@@ -94,8 +94,10 @@ export function useTheme() {
siderColor: subtle
},
Menu: {
borderRadius: '0px',
itemColorActive: selected,
itemColorActiveHover: selected,
itemColorActiveCollapsed: selected,
itemColorHover: dark ? '#2c2c2c' : '#e8e8e8',
itemTextColorActive: accentText,
itemTextColorActiveHover: accentText,