chore: update deps

This commit is contained in:
vben
2024-06-02 23:46:18 +08:00
parent 6d4991d852
commit e650a0b863
52 changed files with 387 additions and 314 deletions

View File

@@ -5,8 +5,4 @@ import type { Preferences } from '@vben-core/preferences';
* @description 项目配置文件
* 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置
*/
export const overridesPreferences: DeepPartial<Preferences> = {
app: {
name: 'Vben Admin',
},
};
export const overridesPreferences: DeepPartial<Preferences> = {};

View File

@@ -10,9 +10,6 @@ import { useTitle } from '@vueuse/core';
import { dynamicRoutes } from '@/router/routes';
// 不需要权限的页面白名单
const WHITE_ROUTE_NAMES = new Set<string>([]);
/**
* 通用守卫配置
* @param router
@@ -67,12 +64,6 @@ function setupAccessGuard(router: Router) {
return true;
}
// 白名单路由列表检查
// TODO: 不是很需要,通过 ignoreAccess 也可以做到,考虑删除
if (WHITE_ROUTE_NAMES.has(to.name as string)) {
return true;
}
// 没有访问权限,跳转登录页面
if (to.fullPath !== LOGIN_PATH) {
return loginPageMeta(to);
@@ -99,11 +90,10 @@ function setupAccessGuard(router: Router) {
// 保存菜单信息和路由信息
accessStore.setAccessMenus(menus);
accessStore.setAccessRoutes(routes);
const redirectPath = (from.query.redirect || to.path) as string;
const redirect = decodeURIComponent(redirectPath);
const redirectPath = (from.query.redirect ?? to.path) as string;
return {
path: redirect,
path: decodeURIComponent(redirectPath),
replace: true,
};
});

View File

@@ -74,7 +74,7 @@ const essentialRoutes: RouteRecordRaw[] = [
hideInBreadcrumb: true,
hideInMenu: true,
hideInTab: true,
ignoreAccess: true,
// ignoreAccess: true,
title: 'Fallback',
},
name: 'Fallback',

View File

@@ -7,7 +7,7 @@ const routes: RouteRecordRaw[] = [
component: BasicLayout,
meta: {
hideChildrenInMenu: true,
orderNo: -1,
order: -1,
title: '首页',
},
name: 'Home',