style: 优化第四种布局

This commit is contained in:
kailong321200875
2022-10-10 16:06:54 +08:00
parent ac981bb24e
commit 122fa62d85
7 changed files with 84 additions and 18 deletions

View File

@@ -34,6 +34,7 @@ interface AppState {
mobile: boolean
footer: boolean
theme: ThemeTypes
fixedMenu: boolean
}
export const useAppStore = defineStore('app', {
@@ -60,6 +61,7 @@ export const useAppStore = defineStore('app', {
footer: true, // 显示页脚
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
dynamicRouter: wsCache.get('dynamicRouter') || false, // 是否动态路由
fixedMenu: wsCache.get('fixedMenu') || false, // 是否固定菜单
layout: wsCache.get('layout') || 'classic', // layout布局
isDark: wsCache.get('isDark') || false, // 是否是暗黑模式
@@ -139,6 +141,9 @@ export const useAppStore = defineStore('app', {
getDynamicRouter(): boolean {
return this.dynamicRouter
},
getFixedMenu(): boolean {
return this.fixedMenu
},
getPageLoading(): boolean {
return this.pageLoading
},
@@ -214,6 +219,10 @@ export const useAppStore = defineStore('app', {
wsCache.set('dynamicRouter', dynamicRouter)
this.dynamicRouter = dynamicRouter
},
setFixedMenu(fixedMenu: boolean) {
wsCache.set('fixedMenu', fixedMenu)
this.fixedMenu = fixedMenu
},
setPageLoading(pageLoading: boolean) {
this.pageLoading = pageLoading
},