fix: 混合模式一些细节

Former-commit-id: 5f51df75efed158c8adb9a9ad0cb92d9e26e3b6c
This commit is contained in:
april
2023-08-15 15:32:40 +08:00
parent e03d73bb48
commit beee3e40a5
4 changed files with 58 additions and 4 deletions

View File

@@ -41,7 +41,9 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], roles: string[]) => {
routes.forEach((route) => {
const tmpRoute = { ...route }; // ES6扩展运算符复制新对象
if (!route.name) {
tmpRoute.name = route.path;
}
// 判断用户(角色)是否有该路由的访问权限
if (hasPermission(roles, tmpRoute)) {
if (tmpRoute.component?.toString() == "Layout") {