Commit 88803d2e authored by hanfeng's avatar hanfeng

路由

parent 75242ecc
......@@ -28,11 +28,11 @@ function hasPermission(menus, route) {
function filterAsyncRouter(asyncRouterMap, menus, menuDatas) {
const accessedRouters = asyncRouterMap.filter(route => {
if (hasPermission(menus, route)) {
// route.name = menuDatas[route.authority].title;
// route.icon = menuDatas[route.authority].icon;
// if (route.children && route.children.length) {
// route.children = filterAsyncRouter(route.children, menus, menuDatas);
// }
route.name = menuDatas[route.authority].title;
route.icon = menuDatas[route.authority].icon;
if (route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, menus, menuDatas);
}
return true
}
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment