From e63fe92cd916fb4ec12c8853d8bc4829daf9a76d Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Thu, 4 Nov 2021 10:25:01 +0800 Subject: [PATCH] fix: update --- src/store/modules/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index ed8702dad..2b8e22f2f 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -2,6 +2,7 @@ import { storageLocal } from "/@/utils/storage"; import { deviceDetection } from "/@/utils/deviceDetection"; import { defineStore } from "pinia"; import { store } from "/@/store"; +import { getConfig } from "/@/config"; interface AppState { sidebar: { @@ -22,7 +23,9 @@ export const useAppStore = defineStore({ withoutAnimation: false }, // 这里的layout用于监听容器拖拉后恢复对应的导航模式 - layout: storageLocal.getItem("responsive-layout")?.layout ?? "vertical", + layout: + storageLocal.getItem("responsive-layout")?.layout?.layout ?? + getConfig().Layout, device: deviceDetection() ? "mobile" : "desktop" }), getters: {