Skip to content

Commit

Permalink
fix(顶部菜单): 修复顶部菜单模式,菜单布局不生效。 (fix vbenjs#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunHsl committed Oct 25, 2023
1 parent 311b249 commit 0713c88
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions packages/layouts/src/components/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ const routerToMenu = (item: RouteRecordItem & RouteMeta) => {

<VbenScrollbar :class="bem('scrollbar')">
<VbenMenu
:class="getTopMenuAlign"
class="w-full"
:style="{
justifyContent:
getTopMenuAlign === 'center' ? 'center' : `flex-${getTopMenuAlign}`,
}"
v-model:value="activeKey"
:options="menuList"
:collapsed="getMenuCollapsed"
Expand Down Expand Up @@ -143,21 +147,5 @@ div:has(> div[class='layout-menu']) {
flex: 1;
flex-basis: auto;
}
& .n-menu--horizontal {
width: 100%;
&.start {
justify-content: flex-start;
}
&.center {
justify-content: center;
}
&.end {
justify-content: flex-end;
}
}
}
</style>

0 comments on commit 0713c88

Please sign in to comment.