Skip to content

Commit

Permalink
fix(@vben/preferences): fix hidden header navigation bar causes the s…
Browse files Browse the repository at this point in the history
…ettings button to not be displayed (#4271)

bug #4268
  • Loading branch information
Mask-MJ authored Aug 29, 2024
1 parent 88a7a9b commit be3bcc1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/@core/preferences/src/use-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ function usePreferences() {
isMobile.value ? 'sidebar-nav' : appPreferences.value.layout,
);

/**
* @zh_CN 是否显示顶栏
*/
const isShowHeaderNav = computed(() => {
return preferences.header.enable;
});

/**
* @zh_CN 是否全屏显示content,不需要侧边、底部、顶部、tab区域
*/
Expand Down Expand Up @@ -180,7 +187,11 @@ function usePreferences() {
}

// 如果是全屏模式或者没有固定在顶部,
const fixed = contentIsMaximize || isFullContent.value || isMobile.value;
const fixed =
contentIsMaximize ||
isFullContent.value ||
isMobile.value ||
!isShowHeaderNav.value;

return {
fixed,
Expand Down

0 comments on commit be3bcc1

Please sign in to comment.