mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 19:09:19 +08:00
fix: 混合侧栏一键进入子页并开启路由进度条,消除首次点菜单无反馈
This commit is contained in:
@@ -10,7 +10,7 @@ import type {
|
||||
|
||||
import { markRaw, reactive, readonly, watch } from 'vue';
|
||||
|
||||
import { StorageManager } from '@vben-core/shared/cache';
|
||||
import { MemoryStorageDriver, StorageManager } from '@vben-core/shared/cache';
|
||||
import { isMacOs, merge } from '@vben-core/shared/utils';
|
||||
|
||||
import {
|
||||
@@ -40,7 +40,8 @@ class PreferenceManager {
|
||||
private state: Preferences;
|
||||
|
||||
constructor() {
|
||||
this.cache = new StorageManager();
|
||||
// 初始化完成前不用 LocalStorage,避免空 prefix 警告与误清全站存储
|
||||
this.cache = new StorageManager({ driver: new MemoryStorageDriver() });
|
||||
// 构造函数不再同步读取缓存,使用默认值初始化
|
||||
// 真正的缓存加载在 initPreferences 中完成(已经是 async)
|
||||
this.state = reactive<Preferences>({ ...defaultPreferences });
|
||||
|
||||
Reference in New Issue
Block a user