feat: 支持双列布局次级菜单折叠及三档响应式断点
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user