保留页面布局
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user