feat: add @vben/hooks and @vben-core/constants

This commit is contained in:
vben
2024-07-13 16:52:08 +08:00
parent daa31f7156
commit 5e0b01c725
34 changed files with 161 additions and 44 deletions

View File

@@ -8,7 +8,7 @@ import { useTitle } from '@vueuse/core';
import { generateAccess } from '#/forward';
import { $t } from '#/locales';
import { dynamicRoutes, essentialsRouteNames } from '#/router/routes';
import { coreRouteNames, dynamicRoutes } from '#/router/routes';
import { useAccessStore } from '#/store';
/**
@@ -63,7 +63,7 @@ function setupAccessGuard(router: Router) {
if (!accessToken) {
if (
// 基本路由,这些路由不需要进入权限拦截
essentialsRouteNames.includes(to.name as string) ||
coreRouteNames.includes(to.name as string) ||
// 明确声明忽略权限访问权限,则可以访问
to.meta.ignoreAccess
) {