From 783ab4e467c95e26f7f031151507bd7ad8333a63 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 08 九月 2023 17:34:47 +0800 Subject: [PATCH] 2023-09-08 --- src/components/header/index.jsx | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 4ad3d8a..069be85 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -60,7 +60,7 @@ if (e.key === 'getSessionStorage' && e.newValue === window.GLOB.appkey) { localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage)) } else if (e.key === 'getSysPermission' && e.newValue === window.GLOB.appkey) { - localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: window.GLOB.mkThdMenus, mkActions: window.GLOB.mkActions})) + localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: this.state.thdMenuList, mkActions: window.GLOB.mkActions})) } else if (e.key === 'menuUpdate') { let vals = e.newValue.split(',') let menuId = vals[1] @@ -180,7 +180,12 @@ } window.GLOB.mainMenu = mainMenu - window.GLOB.mkThdMenus = [...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}] + + thdMenuList.forEach(item => { + window.GLOB.mkThdMenus.set(item.MenuID, item) + }) + + window.GLOB.mkThdMenus.set('home_page_id', {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}) MKEmitter.emit('mainMenuChange') -- Gitblit v1.8.0