fix: 优化菜单空白多次调用项目模块配置问题
This commit is contained in:
parent
4408222206
commit
ef26e5e537
|
@ -34,6 +34,8 @@
|
|||
const { logout } = useUser();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
// @desc: 初始化配置的项目模块
|
||||
appStore.getProjectInfos();
|
||||
const { menuTree } = useMenuTree();
|
||||
const collapsed = computed({
|
||||
get() {
|
||||
|
|
|
@ -86,9 +86,6 @@ export async function topLevelMenuHasPermission(route: RouteLocationNormalized |
|
|||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const { currentMenuConfig } = appStore;
|
||||
if (!currentMenuConfig.length) {
|
||||
await appStore.getProjectInfos();
|
||||
}
|
||||
|
||||
if (currentMenuConfig.length && !currentMenuConfig.includes(route.name as string)) {
|
||||
// 没有配置的菜单不显示
|
||||
|
|
Loading…
Reference in New Issue