This commit is contained in:
2026-01-16 09:37:25 +08:00
parent 947cabd061
commit f33bf735d9
16 changed files with 843 additions and 868 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { customStorage } from '../persist'
export const useLayoutStore = defineStore(
'layout',
() => {
// 布局模式:'sidebar', 'top-nav', 'sidebar-top', 'classic'
const layoutMode = ref('sidebar')
// 布局模式:'default', 'menu', 'top'
const layoutMode = ref('default')
// 侧边栏折叠状态
const sidebarCollapsed = ref(false)
@@ -60,7 +61,7 @@ export const useLayoutStore = defineStore(
{
persist: {
key: 'layout-store',
storage: localStorage,
storage: customStorage,
pick: ['layoutMode', 'sidebarCollapsed']
}
}