fix: header logo may not be collapsed in header-sidebar-nav layout (#5274)

This commit is contained in:
Netfan 2024-12-31 11:35:58 +08:00 committed by GitHub
parent 2135cb8ece
commit 3af22f7e91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -82,10 +82,20 @@ function usePreferences() {
() => appPreferences.value.layout === 'header-nav',
);
/**
* @zh_CN
*/
const isHeaderMixedNav = computed(
() => appPreferences.value.layout === 'header-mixed-nav',
);
/**
* @zh_CN +
*/
const isHeaderSidebarNav = computed(
() => appPreferences.value.layout === 'header-sidebar-nav',
);
/**
* @zh_CN
*/
@ -225,6 +235,7 @@ function usePreferences() {
isFullContent,
isHeaderMixedNav,
isHeaderNav,
isHeaderSidebarNav,
isMixedNav,
isMobile,
isSideMixedNav,

View File

@ -40,6 +40,7 @@ const {
isMobile,
isSideMixedNav,
isHeaderMixedNav,
isHeaderSidebarNav,
layout,
preferencesButtonPosition,
sidebarCollapsed,
@ -81,7 +82,7 @@ const logoCollapsed = computed(() => {
if (isMobile.value && sidebarCollapsed.value) {
return true;
}
if (isHeaderNav.value || isMixedNav.value) {
if (isHeaderNav.value || isMixedNav.value || isHeaderSidebarNav.value) {
return false;
}
return (