style: 统一导航与目录的直角满行布局
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user