保留页面布局

This commit is contained in:
2026-02-05 11:36:55 +08:00
parent d51e6a8f72
commit 821205b18a
15 changed files with 476 additions and 247 deletions

View File

@@ -38,8 +38,18 @@ export const tabs = ref<TabItem[]>([])
/** 是否折叠主侧边栏 */
export const isMainAsideCollapsed = ref<boolean>(false)
/** 屏幕宽度 */
export const windowWidth = ref<number>(1024)
/** 是否为移动端布局 (width < 768) */
export const isMobile = computed<boolean>(() => windowWidth.value < 768)
/** 移动端菜单是否展开 */
export const isMobileMenuOpen = ref<boolean>(false)
/** 是否显示二级侧边栏 */
export const showSubSider = computed<boolean>(() => {
if (isMobile.value) return false // 移动端不显式二级侧边栏在主体区域
const topMenus = getTopMenus()
const activeMenu = topMenus.find(m => m.id === activeTopMenuId.value)
return activeMenu ? activeMenu.groups.length > 0 : false