refactor: 路由代码优化和完善注释

Former-commit-id: 859d3b74927b032ad265170d6e6ffd821b3fa0d3
This commit is contained in:
haoxr
2023-02-11 10:41:07 +08:00
parent e8d931f816
commit c68479e3bb
5 changed files with 38 additions and 48 deletions

View File

@@ -46,6 +46,7 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], roles: string[]) => {
if (hasPermission(roles, tmpRoute)) {
if (tmpRoute.component?.toString() == 'Layout') {
tmpRoute.component = Layout;
console.log();
} else {
const component = modules[`../../views/${tmpRoute.component}.vue`];
if (component) {