feat(projects): mock添加权限过滤

This commit is contained in:
Soybean
2022-04-23 12:29:09 +08:00
parent 807448aec5
commit 7f4350aeb6
9 changed files with 109 additions and 35 deletions

View File

@ -53,7 +53,7 @@ export const useTabStore = defineStore('tab-store', {
initHomeTab(routeHomeName: string, router: Router) {
const routes = router.getRoutes();
const findHome = routes.find(item => item.name === routeHomeName);
if (findHome && !findHome.children) {
if (findHome && !findHome.children.length) {
// 有子路由的不能作为Tab
this.homeTab = getTabRouteByVueRoute(findHome);
}