mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 11:35:58 +08:00
wip(menu): perf menu
This commit is contained in:
@@ -68,6 +68,7 @@ export async function getCurrentParentPath(currentPath: string) {
|
||||
export async function getShallowMenus(): Promise<Menu[]> {
|
||||
const menus = await getAsyncMenus();
|
||||
const routes = router.getRoutes();
|
||||
|
||||
const shallowMenuList = menus.map((item) => ({ ...item, children: undefined }));
|
||||
return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList;
|
||||
}
|
||||
|
Reference in New Issue
Block a user