|
@@ -42,6 +42,7 @@ function btnFun(items: any) {
|
|
|
//返回子路由
|
|
|
function routeFun(items: any) {
|
|
|
return items.children.map((route: any) => {//循环重组
|
|
|
+ // console.log(route)
|
|
|
if (route?.children?.length > 0) {
|
|
|
let arr = routeFun(route)
|
|
|
return { path: route.path, name: route.meta.title, component: route.component, routes: arr, icon: route.meta.icon, key: route?.menuId }
|
|
@@ -50,7 +51,7 @@ function routeFun(items: any) {
|
|
|
let arr = btnFun(route)
|
|
|
return { path: route.path, name: route.meta.title, component: route.component, routes: arr, icon: route.meta.icon, key: route?.menuId }
|
|
|
}
|
|
|
- return { path: route.path, name: route.meta.title, component: route.component, icon: items.meta.icon, key: route?.menuId }
|
|
|
+ return { path: route.path, name: route.meta.title, component: route.component, icon: route.icon, key: route?.menuId }
|
|
|
})
|
|
|
}
|
|
|
/**获取线上菜单并重组路由格式和权限*/
|