Skip to content

Commit

Permalink
fix(projects): 修复tabs在static路由模式下可以关闭首页
Browse files Browse the repository at this point in the history
  • Loading branch information
yanbowe committed Nov 29, 2022
1 parent 810398a commit 7211a17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/store/modules/route/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
/** 初始化权限路由 */
Expand Down

0 comments on commit 7211a17

Please sign in to comment.