refactor(layout): 收起侧边栏

v3.2
tanlianwang 2026-03-04 13:45:06 +08:00
parent 0546b773db
commit fca23b4816
3 changed files with 28 additions and 27 deletions

View File

@ -50,7 +50,7 @@ const props = defineProps({
}, },
}) })
const isCollapse = ref(false) const isCollapse = ref(true)
const leftWidth = ref(props.minLeftWidth) const leftWidth = ref(props.minLeftWidth)
const isResizing = ref(false) const isResizing = ref(false)

View File

@ -48,12 +48,13 @@ const currentSystemPage = computed(() => {
<template> <template>
<div class="app-layout"> <div class="app-layout">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''"> <div class="app-main" :class="user.isExpire() ? 'isExpire' : ''" style="display: flex;">
<LayoutContainer> <!-- 最左侧侧边栏 -->
<template #left> <div style="width: 240px; border-right: 1px solid #e5e7eb;">
<Sidebar /> <Sidebar />
</template> </div>
<div> <!-- 主内容区 -->
<div style="flex: 1; overflow: hidden;">
<!-- 顶部功能区仅系统管理模式显示 --> <!-- 顶部功能区仅系统管理模式显示 -->
<div v-if="isSystemManagement" style="display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e5e7eb;"> <div v-if="isSystemManagement" style="display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e5e7eb;">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
@ -66,10 +67,8 @@ const currentSystemPage = computed(() => {
</router-link> </router-link>
</div> </div>
</div> </div>
<AppMain /> <AppMain />
</div> </div>
</LayoutContainer>
</div> </div>
</div> </div>
</template> </template>

View File

@ -11,13 +11,15 @@
/> />
<SystemHeader /> <SystemHeader />
</div> </div>
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''"> <div class="app-main" :class="user.isExpire() ? 'isExpire' : ''" style="display: flex;">
<layout-container> <!-- 最左侧侧边栏 -->
<template #left> <div style="width: 240px; border-right: 1px solid #e5e7eb;">
<Sidebar /> <Sidebar />
</template> </div>
<!-- 主内容区 -->
<div style="flex: 1; overflow: hidden;">
<AppMain /> <AppMain />
</layout-container> </div>
</div> </div>
</div> </div>
</template> </template>