From be3bcc1122efa3b12dca776ad4c0688b09928ecb Mon Sep 17 00:00:00 2001 From: moyaojun <41281346+Mask-MJ@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:37:29 +0800 Subject: [PATCH] fix(@vben/preferences): fix hidden header navigation bar causes the settings button to not be displayed (#4271) bug #4268 --- packages/@core/preferences/src/use-preferences.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/@core/preferences/src/use-preferences.ts b/packages/@core/preferences/src/use-preferences.ts index ff5dbedf..2e895150 100644 --- a/packages/@core/preferences/src/use-preferences.ts +++ b/packages/@core/preferences/src/use-preferences.ts @@ -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区域 */ @@ -180,7 +187,11 @@ function usePreferences() { } // 如果是全屏模式或者没有固定在顶部, - const fixed = contentIsMaximize || isFullContent.value || isMobile.value; + const fixed = + contentIsMaximize || + isFullContent.value || + isMobile.value || + !isShowHeaderNav.value; return { fixed,