mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 15:59:33 +08:00
chore: detail optimization
This commit is contained in:
@@ -107,7 +107,8 @@ export async function getFlatChildrenMenus(children: Menu[]) {
|
||||
function basicFilter(routes: RouteRecordNormalized[]) {
|
||||
return (menu: Menu) => {
|
||||
const matchRoute = routes.find((route) => route.path === menu.path);
|
||||
if (!matchRoute) return false;
|
||||
|
||||
if (!matchRoute) return true;
|
||||
menu.icon = menu.icon || matchRoute.meta.icon;
|
||||
menu.meta = matchRoute.meta;
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user