This commit is contained in:
dap
2024-12-30 19:38:01 +08:00
53 changed files with 359 additions and 93 deletions

View File

@@ -71,7 +71,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
"collapsedShowTitle": false,
"enable": true,
"expandOnHover": true,
"extraCollapse": true,
"extraCollapse": false,
"hidden": false,
"width": 224,
},

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/preferences",
"version": "5.5.1",
"version": "5.5.2",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -71,7 +71,7 @@ const defaultPreferences: Preferences = {
collapsedShowTitle: false,
enable: true,
expandOnHover: true,
extraCollapse: true,
extraCollapse: false,
hidden: false,
width: 224,
},

View File

@@ -82,6 +82,10 @@ function usePreferences() {
() => appPreferences.value.layout === 'header-nav',
);
const isHeaderMixedNav = computed(
() => appPreferences.value.layout === 'header-mixed-nav',
);
/**
* @zh_CN 是否为混合导航模式
*/
@@ -93,7 +97,12 @@ function usePreferences() {
* @zh_CN 是否包含侧边导航模式
*/
const isSideMode = computed(() => {
return isMixedNav.value || isSideMixedNav.value || isSideNav.value;
return (
isMixedNav.value ||
isSideMixedNav.value ||
isSideNav.value ||
isHeaderMixedNav.value
);
});
const sidebarCollapsed = computed(() => {
@@ -214,6 +223,7 @@ function usePreferences() {
globalSearchShortcutKey,
isDark,
isFullContent,
isHeaderMixedNav,
isHeaderNav,
isMixedNav,
isMobile,