diff --git a/docs/src/guide/essentials/settings.md b/docs/src/guide/essentials/settings.md index 0c46ad72..013bde76 100644 --- a/docs/src/guide/essentials/settings.md +++ b/docs/src/guide/essentials/settings.md @@ -261,7 +261,7 @@ const defaultPreferences: Preferences = { mode: 'dark', radius: '0.5', semiDarkHeader: false, - semiDarkMenu: true, + semiDarkSidebar: true, }, transition: { enable: true, @@ -456,7 +456,7 @@ interface ThemePreferences { /** 是否开启半深色header(只在theme='light'时生效) */ semiDarkHeader: boolean; /** 是否开启半深色菜单(只在theme='light'时生效) */ - semiDarkMenu: boolean; + semiDarkSidebar: boolean; } interface TransitionPreferences { diff --git a/packages/@core/preferences/src/config.ts b/packages/@core/preferences/src/config.ts index 8d36fe91..99e3a3a0 100644 --- a/packages/@core/preferences/src/config.ts +++ b/packages/@core/preferences/src/config.ts @@ -91,7 +91,7 @@ const defaultPreferences: Preferences = { mode: 'dark', radius: '0.5', semiDarkHeader: false, - semiDarkMenu: true, + semiDarkSidebar: true, }, transition: { enable: true, diff --git a/packages/@core/preferences/src/types.ts b/packages/@core/preferences/src/types.ts index 86d65355..71137166 100644 --- a/packages/@core/preferences/src/types.ts +++ b/packages/@core/preferences/src/types.ts @@ -186,7 +186,7 @@ interface ThemePreferences { /** 是否开启半深色header(只在theme='light'时生效) */ semiDarkHeader: boolean; /** 是否开启半深色菜单(只在theme='light'时生效) */ - semiDarkMenu: boolean; + semiDarkSidebar: boolean; } interface TransitionPreferences { diff --git a/packages/@core/ui-kit/menu-ui/src/components/menu.vue b/packages/@core/ui-kit/menu-ui/src/components/menu.vue index 967d29d6..0bbac3f0 100644 --- a/packages/@core/ui-kit/menu-ui/src/components/menu.vue +++ b/packages/@core/ui-kit/menu-ui/src/components/menu.vue @@ -498,13 +498,13 @@ $namespace: vben; --menu-background-color: transparent; &.is-dark { - --menu-item-hover-color: var(--foreground); + --menu-item-hover-color: hsl(var(--accent-foreground)); --menu-item-hover-background-color: hsl(var(--accent)); - --menu-item-active-color: hsl(var(--foreground)); + --menu-item-active-color: hsl(var(--accent-foreground)); --menu-item-active-background-color: hsl(var(--accent)); --menu-submenu-active-color: hsl(var(--foreground)); --menu-submenu-active-background-color: hsl(var(--accent)); - --menu-submenu-hover-color: hsl(var(--foreground)); + --menu-submenu-hover-color: hsl(var(--accent-foreground)); --menu-submenu-hover-background-color: hsl(var(--accent)); } diff --git a/packages/effects/layouts/src/basic/layout.vue b/packages/effects/layouts/src/basic/layout.vue index 858da654..1dfa97ce 100644 --- a/packages/effects/layouts/src/basic/layout.vue +++ b/packages/effects/layouts/src/basic/layout.vue @@ -48,7 +48,7 @@ const { updateWatermark } = useWatermark(); const lockStore = useLockStore(); const sidebarTheme = computed(() => { - const dark = isDark.value || preferences.theme.semiDarkMenu; + const dark = isDark.value || preferences.theme.semiDarkSidebar; return dark ? 'dark' : 'light'; }); diff --git a/packages/effects/layouts/src/widgets/preferences/blocks/theme/theme.vue b/packages/effects/layouts/src/widgets/preferences/blocks/theme/theme.vue index 37cd5eb6..6341f676 100644 --- a/packages/effects/layouts/src/widgets/preferences/blocks/theme/theme.vue +++ b/packages/effects/layouts/src/widgets/preferences/blocks/theme/theme.vue @@ -13,7 +13,7 @@ defineOptions({ }); const modelValue = defineModel({ default: 'auto' }); -const themeSemiDarkMenu = defineModel('themeSemiDarkMenu'); +const themeSemiDarkSidebar = defineModel('themeSemiDarkSidebar'); const themeSemiDarkHeader = defineModel('themeSemiDarkHeader'); const THEME_PRESET: Array<{ icon: Component; name: ThemeModeType }> = [ @@ -70,11 +70,11 @@ function nameView(name: string) { - {{ $t('preferences.theme.darkMenu') }} + {{ $t('preferences.theme.darkSidebar') }} {{ $t('preferences.theme.darkHeader') }} diff --git a/packages/effects/layouts/src/widgets/preferences/preferences-sheet.vue b/packages/effects/layouts/src/widgets/preferences/preferences-sheet.vue index 7388bf5c..5c7e1caf 100644 --- a/packages/effects/layouts/src/widgets/preferences/preferences-sheet.vue +++ b/packages/effects/layouts/src/widgets/preferences/preferences-sheet.vue @@ -73,7 +73,7 @@ const themeColorPrimary = defineModel('themeColorPrimary'); const themeBuiltinType = defineModel('themeBuiltinType'); const themeMode = defineModel('themeMode'); const themeRadius = defineModel('themeRadius'); -const themeSemiDarkMenu = defineModel('themeSemiDarkMenu'); +const themeSemiDarkSidebar = defineModel('themeSemiDarkSidebar'); const themeSemiDarkHeader = defineModel('themeSemiDarkHeader'); const sidebarEnable = defineModel('sidebarEnable'); @@ -276,7 +276,7 @@ async function handleReset() { diff --git a/packages/locales/src/langs/en-US.json b/packages/locales/src/langs/en-US.json index 51ba0e87..77f9db11 100644 --- a/packages/locales/src/langs/en-US.json +++ b/packages/locales/src/langs/en-US.json @@ -236,7 +236,7 @@ "radius": "Radius", "light": "Light", "dark": "Dark", - "darkMenu": "Semi Dark Menu", + "darkSidebar": "Semi Dark Sidebar", "darkHeader": "Semi Dark Header", "weakMode": "Weak Mode", "grayMode": "Gray Mode", diff --git a/packages/locales/src/langs/zh-CN.json b/packages/locales/src/langs/zh-CN.json index 208c3cd0..708d22f7 100644 --- a/packages/locales/src/langs/zh-CN.json +++ b/packages/locales/src/langs/zh-CN.json @@ -236,7 +236,7 @@ "radius": "圆角", "light": "浅色", "dark": "深色", - "darkMenu": "深色菜单", + "darkSidebar": "深色侧边栏", "darkHeader": "深色顶栏", "weakMode": "色弱模式", "grayMode": "灰色模式",