Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat: header添加子菜单布局以支持分割菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmao88 committed Nov 1, 2023
1 parent cc0ba04 commit 4df7dfd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/layouts/src/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ const getShowSetting = computed(() => {
const getShowHeaderMultipleTab = computed(() => {
return unref(getShowMultipleTab) && unref(getMenuType) !== NavBarModeEnum.MIX
})
// 是否显示header中的logo
const showHeaderLogo = computed(() => {
return unref(isTopMenu) || unref(isMix)
})
//是否显示header中的面包屑
const showHeaderBreadcrumb = computed(() => {
return !(unref(isTopMenu) || (unref(isMix) && unref(menu).split))
})
//根据布局模式设置logo宽度
const logoWidth = computed(() => (unref(isTopMenu) ? 150 : getMenuWidth.value))
</script>
Expand All @@ -70,12 +76,12 @@ const logoWidth = computed(() => (unref(isTopMenu) ? 150 : getMenuWidth.value))
}"
/>
<HeaderTrigger v-if="getShowHeaderTrigger" />
<slot name="breadcrumb">
<LayoutBreadcrumb v-if="!(isTopMenu || (isMix && menu.split))" />
<slot name="breadcrumb" v-if="showHeaderBreadcrumb">
<LayoutBreadcrumb />
</slot>
</VbenSpace>
</slot>
<slot name="menu"></slot>
<slot name="menu" v-if="!showHeaderBreadcrumb"></slot>
<div class="pl-8px pr-8px">
<slot name="buttons">
<VbenSpace class="p-1" :size="16" align="center">
Expand Down

0 comments on commit 4df7dfd

Please sign in to comment.