mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
fix: 修复边栏无法打开问题,deepMerge函数有问题未修复
This commit is contained in:
parent
c6e5c0f5f1
commit
a0fdceeae7
@ -123,7 +123,7 @@ export function useMenuSetting() {
|
||||
|
||||
// Set menu configuration
|
||||
function setMenuSetting(menuSetting: Partial<MenuSetting>): void {
|
||||
appStore.setProjectConfig({ menuSetting });
|
||||
appStore.setMenuSetting(menuSetting);
|
||||
}
|
||||
|
||||
function toggleCollapsed() {
|
||||
@ -133,9 +133,7 @@ export function useMenuSetting() {
|
||||
}
|
||||
return {
|
||||
setMenuSetting,
|
||||
|
||||
toggleCollapsed,
|
||||
|
||||
getMenuFixed,
|
||||
getRealWidth,
|
||||
getMenuType,
|
||||
|
@ -82,6 +82,10 @@ export const useAppStore = defineStore({
|
||||
this.projectConfig = deepMerge(this.projectConfig || {}, config);
|
||||
Persistent.setLocal(PROJ_CFG_KEY, this.projectConfig);
|
||||
},
|
||||
setMenuSetting(setting: Partial<MenuSetting>): void {
|
||||
this.projectConfig.menuSetting = deepMerge(this.projectConfig.menuSetting, setting);
|
||||
Persistent.setLocal(PROJ_CFG_KEY, this.projectConfig);
|
||||
},
|
||||
|
||||
async resetAllState() {
|
||||
resetRouter();
|
||||
|
Loading…
Reference in New Issue
Block a user