fix(菜单): 系统页面刷新菜单模块消失修复
This commit is contained in:
parent
c8ea1a4bba
commit
84f26fc593
|
@ -28,10 +28,8 @@ export default function useMenuTree() {
|
|||
}
|
||||
|
||||
// 如果是隐藏的模块,则不显示菜单
|
||||
if (
|
||||
featureRouteMap[element.name as string] &&
|
||||
!appStore.currentMenuConfig.includes(featureRouteMap[element.name as string])
|
||||
) {
|
||||
const moduleId = Object.keys(featureRouteMap).find((key) => (element.name as string)?.includes(key));
|
||||
if (moduleId && featureRouteMap[moduleId] && !appStore.currentMenuConfig.includes(featureRouteMap[moduleId])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -257,11 +257,6 @@ const useUserStore = defineStore('user', {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (routeName?.includes('setting')) {
|
||||
// 访问系统设置下的页面,不需要获取项目信息,会在切换到非系统设置页面时获取(ms-menu组件内初始化会获取)
|
||||
appStore.setCurrentMenuConfig([]);
|
||||
return;
|
||||
}
|
||||
const res = await getProjectInfo(appStore.currentProjectId);
|
||||
if (!res) {
|
||||
// 如果项目被删除或者被禁用,跳转到无项目页面
|
||||
|
|
Loading…
Reference in New Issue