Explorar o código

解决动态菜单跳转问题。

wukai %!s(int64=2) %!d(string=hai) anos
pai
achega
108e1fd126
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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']