diff --git a/packages/@core/base/typings/src/app.d.ts b/packages/@core/base/typings/src/app.d.ts index ae49c786e..02da2466a 100644 --- a/packages/@core/base/typings/src/app.d.ts +++ b/packages/@core/base/typings/src/app.d.ts @@ -2,6 +2,7 @@ type LayoutType = | 'full-content' | 'header-mixed-nav' | 'header-nav' + | 'header-sidebar-nav' | 'mixed-nav' | 'sidebar-mixed-nav' | 'sidebar-nav'; diff --git a/packages/@core/ui-kit/layout-ui/src/hooks/use-layout.ts b/packages/@core/ui-kit/layout-ui/src/hooks/use-layout.ts index 7b758dc46..2f2b82bb1 100644 --- a/packages/@core/ui-kit/layout-ui/src/hooks/use-layout.ts +++ b/packages/@core/ui-kit/layout-ui/src/hooks/use-layout.ts @@ -29,7 +29,11 @@ export function useLayout(props: VbenLayoutProps) { /** * 是否为混合导航模式 */ - const isMixedNav = computed(() => currentLayout.value === 'mixed-nav'); + const isMixedNav = computed( + () => + currentLayout.value === 'mixed-nav' || + currentLayout.value === 'header-sidebar-nav', + ); /** * 是否为头部混合模式 diff --git a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue index dee990b3c..8821bfab5 100644 --- a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue +++ b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue @@ -183,7 +183,8 @@ const isSideMode = computed( currentLayout.value === 'mixed-nav' || currentLayout.value === 'sidebar-mixed-nav' || currentLayout.value === 'sidebar-nav' || - currentLayout.value === 'header-mixed-nav', + currentLayout.value === 'header-mixed-nav' || + currentLayout.value === 'header-sidebar-nav', ); /** @@ -215,6 +216,7 @@ const mainStyle = computed(() => { headerFixed.value && currentLayout.value !== 'header-nav' && currentLayout.value !== 'mixed-nav' && + currentLayout.value !== 'header-sidebar-nav' && showSidebar.value && !props.isMobile ) { diff --git a/packages/effects/layouts/src/widgets/preferences/blocks/layout/layout.vue b/packages/effects/layouts/src/widgets/preferences/blocks/layout/layout.vue index 5fd6fc7f9..c232d7c81 100644 --- a/packages/effects/layouts/src/widgets/preferences/blocks/layout/layout.vue +++ b/packages/effects/layouts/src/widgets/preferences/blocks/layout/layout.vue @@ -11,6 +11,7 @@ import { FullContent, HeaderMixedNav, HeaderNav, + HeaderSidebarNav, MixedNav, SidebarMixedNav, SidebarNav, @@ -35,6 +36,7 @@ const components: Record = { 'sidebar-mixed-nav': SidebarMixedNav, 'sidebar-nav': SidebarNav, 'header-mixed-nav': HeaderMixedNav, + 'header-sidebar-nav': HeaderSidebarNav, }; const PRESET = computed((): PresetItem[] => [ @@ -53,6 +55,11 @@ const PRESET = computed((): PresetItem[] => [ tip: $t('preferences.horizontalTip'), type: 'header-nav', }, + { + name: $t('preferences.headerSidebarNav'), + tip: $t('preferences.headerSidebarNavTip'), + type: 'header-sidebar-nav', + }, { name: $t('preferences.mixedMenu'), tip: $t('preferences.mixedMenuTip'), diff --git a/packages/effects/layouts/src/widgets/preferences/icons/header-sidebar-nav.vue b/packages/effects/layouts/src/widgets/preferences/icons/header-sidebar-nav.vue new file mode 100644 index 000000000..b44e249ec --- /dev/null +++ b/packages/effects/layouts/src/widgets/preferences/icons/header-sidebar-nav.vue @@ -0,0 +1,177 @@ + diff --git a/packages/effects/layouts/src/widgets/preferences/icons/index.ts b/packages/effects/layouts/src/widgets/preferences/icons/index.ts index 39f8c7de3..7eec1b470 100644 --- a/packages/effects/layouts/src/widgets/preferences/icons/index.ts +++ b/packages/effects/layouts/src/widgets/preferences/icons/index.ts @@ -3,6 +3,7 @@ import HeaderNav from './header-nav.vue'; export { default as ContentCompact } from './content-compact.vue'; export { default as FullContent } from './full-content.vue'; export { default as HeaderMixedNav } from './header-mixed-nav.vue'; +export { default as HeaderSidebarNav } from './header-sidebar-nav.vue'; export { default as MixedNav } from './mixed-nav.vue'; export { default as SidebarMixedNav } from './sidebar-mixed-nav.vue'; export { default as SidebarNav } from './sidebar-nav.vue'; diff --git a/packages/locales/src/langs/en-US/preferences.json b/packages/locales/src/langs/en-US/preferences.json index 57b535c49..51643de1b 100644 --- a/packages/locales/src/langs/en-US/preferences.json +++ b/packages/locales/src/langs/en-US/preferences.json @@ -17,6 +17,8 @@ "horizontalTip": "Horizontal menu mode, all menus displayed at the top", "twoColumn": "Two Column", "twoColumnTip": "Vertical Two Column Menu Mode", + "headerSidebarNav": "Header Vertical", + "headerSidebarNavTip": "Header Full Width, Sidebar Navigation Mode", "mixedMenu": "Mixed Menu", "mixedMenuTip": "Vertical & Horizontal Menu Co-exists", "fullContent": "Full Content", diff --git a/packages/locales/src/langs/zh-CN/preferences.json b/packages/locales/src/langs/zh-CN/preferences.json index aeb455638..ca867695c 100644 --- a/packages/locales/src/langs/zh-CN/preferences.json +++ b/packages/locales/src/langs/zh-CN/preferences.json @@ -17,6 +17,8 @@ "horizontalTip": "水平菜单模式,菜单全部显示在顶部", "twoColumn": "双列菜单", "twoColumnTip": "垂直双列菜单模式", + "headerSidebarNav": "侧边导航", + "headerSidebarNavTip": "顶部通栏,侧边导航模式", "headerTwoColumn": "混合双列", "headerTwoColumnTip": "双列、水平菜单共存模式", "mixedMenu": "混合垂直",