fix(@vben/layouts): correct logo theme in semi-dark sidebar (#7785) (#7902)

master^2
MistyMoon 2026-05-10 10:41:43 +08:00 committed by GitHub
parent f5feddc6c7
commit ba60bc3c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -43,6 +43,7 @@ const {
isHeaderNav,
isMixedNav,
isMobile,
isSideMode,
isSideMixedNav,
isHeaderMixedNav,
isHeaderSidebarNav,
@ -108,6 +109,15 @@ const showHeaderNav = computed(() => {
);
});
const logoTheme = computed(() => {
const showLogoInHeader =
!isSideMode.value ||
isHeaderSidebarNav.value ||
isMixedNav.value ||
isMobile.value;
return showLogoInHeader ? headerTheme.value : sidebarTheme.value;
});
const {
handleMenuSelect,
handleMenuOpen,
@ -282,7 +292,7 @@ const headerSlots = computed(() => {
:src="preferences.logo.source"
:src-dark="preferences.logo.sourceDark"
:text="preferences.app.name"
:theme="showHeaderNav ? headerTheme : theme"
:theme="logoTheme"
@click="clickLogo"
>
<template v-if="$slots['logo-text']" #text>