Przeglądaj źródła

解决动态菜单跳转问题。

wukai 2 lat temu
rodzic
commit
108e1fd126
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/store/modules/permission.js

+ 3 - 0
src/store/modules/permission.js

@@ -86,6 +86,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
       }
     }
     if (route.children != null && route.children && route.children.length) {
+      if (route.path.startsWith("/home")) {
+        route.component = () => import('@/views1/HomeView.vue')
+      }
       route.children = filterAsyncRouter(route.children, route, type)
     } else {
       delete route['children']