perf: router

This commit is contained in:
xiaoxian521
2021-12-12 19:46:58 +08:00
parent 5d6ed8da33
commit 00cc5a88e0
8 changed files with 29 additions and 4 deletions

View File

@@ -120,7 +120,7 @@ const initRouter = (name: string) => {
router.options.routes[0].children.push(v);
// 最终路由进行升序
ascending(router.options.routes[0].children);
router.addRoute("home", v);
if (!router.hasRoute(v?.name)) router.addRoute(v);
}
resolve(router);
}