feat(components): 添加vertical-mix的导航模式下的菜单

This commit is contained in:
Soybean
2021-09-27 00:47:04 +08:00
parent 2fe3d27a36
commit f24ec1c532
15 changed files with 251 additions and 54 deletions

View File

@ -3,7 +3,7 @@
<global-sider v-if="theme.isVerticalNav" :z-index="3" />
<global-header v-if="isHorizontalMix" :z-index="4" />
<div class="flex-1-hidden flex h-full">
<global-sider v-if="isHorizontalMix" class="sider-margin" :z-index="3" />
<global-sider v-if="isHorizontalMix" :z-index="3" />
<n-scrollbar
ref="scrollbar"
class="h-full"
@ -40,10 +40,6 @@ const routeProps = useRouteProps();
const isHorizontalMix = computed(() => theme.navStyle.mode === 'horizontal-mix');
const headerHeight = computed(() => {
const { height } = theme.headerStyle;
return `${height}px`;
});
const headerAndMultiTabHeight = computed(() => {
const {
headerStyle: { height: hHeight },
@ -63,9 +59,7 @@ watch(
:deep(.n-scrollbar-rail) {
z-index: 11;
}
.sider-margin {
margin-top: v-bind(headerHeight);
}
.content-padding {
padding-top: v-bind(headerAndMultiTabHeight);
}