perf: 替换Header组件

This commit is contained in:
rd
2025-08-16 18:00:06 +08:00
parent c7a94855b2
commit dade534122

View File

@ -17,6 +17,7 @@ const userStore = useUserStore();
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const Header = Layout.Header;
const Sider = Layout.Sider; const Sider = Layout.Sider;
const Content = Layout.Content; const Content = Layout.Content;
@ -58,9 +59,9 @@ const checkHasInviteCode = () => {
<template> <template>
<Layout :class="['layout-wrap', { mobile: appStore.hideMenu }]" class="h-full flex flex-col w-full"> <Layout :class="['layout-wrap', { mobile: appStore.hideMenu }]" class="h-full flex flex-col w-full">
<JoinModal v-model:visible="joinEnterpriseVisible" ref="joinModalRef" /> <JoinModal v-model:visible="joinEnterpriseVisible" ref="joinModalRef" />
<section class="layout-navbar-wrap"> <Header class="layout-header-wrap">
<base-navbar /> <base-navbar />
</section> </Header>
<Layout class="flex layout-content-wrap"> <Layout class="flex layout-content-wrap">
<Sider <Sider
v-if="showSider" v-if="showSider"
@ -89,13 +90,12 @@ const checkHasInviteCode = () => {
font-family: inherit; font-family: inherit;
background: transparent; background: transparent;
min-width: 1200px; min-width: 1200px;
.layout-navbar-wrap { .layout-header-wrap {
position: sticky; background: transparent;
top: 0;
left: 0;
z-index: 1000;
width: 100%;
height: $navbar-height; height: $navbar-height;
line-height: $navbar-height;
padding-inline: inherit;
color: inherit;
} }
.layout-content-wrap { .layout-content-wrap {
height: 100%; height: 100%;