mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
fix: 修复resetRouter未清空全部路由数据 (#1208)
This commit is contained in:
@@ -172,6 +172,8 @@ function handleAsyncRoutes(routeList) {
|
||||
const flattenRouters: any = router
|
||||
.getRoutes()
|
||||
.find(n => n.path === "/");
|
||||
// 保持router.options.routes[0].children与path为"/"的children一致,防止数据不一致导致异常
|
||||
flattenRouters.children = router.options.routes[0].children;
|
||||
router.addRoute(flattenRouters);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user