Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-21 11:29:20 +08:00

fix: 解决项目配置的缓存项少于实际所需项数时导致的页面空白问题

This commit is contained in:
pany 2023-08-21 17:15:12 +08:00
parent 30ec43d490
commit 82c3409b7d

View File

@ -1,6 +1,6 @@
import { getConfigLayout } from "@/utils/cache/local-storage"
/** 项目配置 */
/** 项目配置类型 */
export interface LayoutSettings {
/** 是否显示 Settings Panel */
showSettings: boolean
@ -28,7 +28,8 @@ export interface LayoutSettings {
showColorWeakness: boolean
}
export const layoutSettings: LayoutSettings = getConfigLayout() ?? {
/** 默认配置 */
const defaultSettings: LayoutSettings = {
layoutMode: "left",
showSettings: true,
showTagsView: true,
@ -42,3 +43,6 @@ export const layoutSettings: LayoutSettings = getConfigLayout() ?? {
showGreyMode: false,
showColorWeakness: false
}
/** 项目配置 */
export const layoutSettings: LayoutSettings = { ...defaultSettings, ...getConfigLayout() }