feat: 支持双列布局次级菜单折叠及三档响应式断点

This commit is contained in:
Ray.Hao
2026-07-02 20:25:51 +08:00
parent c966764314
commit cdf43ea71a
9 changed files with 130 additions and 42 deletions

View File

@@ -34,6 +34,13 @@ export const useAppStore = defineStore("app", () => {
withoutAnimation: false,
});
/**
* 双列布局第二列(次级菜单)展开状态
*/
const secondarySidebar = reactive({
opened: true,
});
/**
* 当前激活的顶部菜单路径
*/
@@ -73,6 +80,13 @@ export const useAppStore = defineStore("app", () => {
sidebarStatus.value = SidebarStatus.OPENED;
}
/**
* 切换第二列(次级菜单)展开状态
*/
function toggleSecondarySidebar() {
secondarySidebar.opened = !secondarySidebar.opened;
}
/**
* 切换设备类型
*/
@@ -111,6 +125,7 @@ export const useAppStore = defineStore("app", () => {
return {
device,
sidebar,
secondarySidebar,
language,
locale,
size,
@@ -121,6 +136,7 @@ export const useAppStore = defineStore("app", () => {
toggleSidebar,
closeSidebar,
openSidebar,
toggleSecondarySidebar,
setActiveTopMenuPath,
toggleContentFullscreen,
activeTopMenuPath,