Merge pull request #158 from yanbowe/main

fix(projects): 修复tabs在static路由模式下可以关闭首页
This commit is contained in:
Soybean 2022-11-29 23:27:24 +08:00 committed by GitHub
commit bb8af263e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,9 +128,14 @@ export const useRouteStore = defineStore('route-store', {
},
/** 初始化静态路由 */
async initStaticRoute() {
const { initHomeTab } = useTabStore();
const auth = useAuthStore();
const routes = filterAuthRoutesByUserPermission(staticRoutes, auth.userInfo.userRole);
this.handleAuthRoute(routes);
initHomeTab(this.routeHomeName, router);
this.isInitAuthRoute = true;
},
/** 初始化权限路由 */