feat(projects): 新增顶部菜单

This commit is contained in:
Soybean
2021-09-23 00:15:19 +08:00
parent e9db67ee12
commit 221d2cc02d
10 changed files with 102 additions and 29 deletions

View File

@ -1,7 +1,7 @@
<template>
<n-layout class="h-full" has-sider>
<global-sider v-if="theme.isVerticalNav" :z-index="3" />
<global-header v-if="isHorizontalMix" :z-index="2" />
<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" />
<n-scrollbar
@ -39,6 +39,11 @@ const { scrollbar, resetScrollBehavior } = useScrollBehavior();
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 },
@ -59,7 +64,7 @@ watch(
z-index: 11;
}
.sider-margin {
margin-top: v-bind(headerAndMultiTabHeight);
margin-top: v-bind(headerHeight);
}
.content-padding {
padding-top: v-bind(headerAndMultiTabHeight);