调整
This commit is contained in:
@@ -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']
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user