Skip to content

Commit

Permalink
fix: header logo may not be collapsed in header-sidebar-nav layout (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan authored Dec 31, 2024
1 parent 2135cb8 commit 3af22f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/@core/preferences/src/use-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 是否为混合导航模式
*/
Expand Down Expand Up @@ -225,6 +235,7 @@ function usePreferences() {
isFullContent,
isHeaderMixedNav,
isHeaderNav,
isHeaderSidebarNav,
isMixedNav,
isMobile,
isSideMixedNav,
Expand Down
3 changes: 2 additions & 1 deletion packages/effects/layouts/src/basic/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const {
isMobile,
isSideMixedNav,
isHeaderMixedNav,
isHeaderSidebarNav,
layout,
preferencesButtonPosition,
sidebarCollapsed,
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit 3af22f7

Please sign in to comment.