feat: request && login && router【e6939e22】(不包括 login.vue 和 request.ts)

This commit is contained in:
YunaiV
2025-03-20 12:34:02 +08:00
parent 83f6a0fbf7
commit 3c3886e345
15 changed files with 193 additions and 85 deletions

View File

@@ -1,20 +1,43 @@
import type { BasicUserInfo } from '@vben-core/typings';
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
/** 用户信息 */
interface UserInfo extends BasicUserInfo {
/**
* 用户描述
*/
desc: string;
/**
* 首页地址
*/
homePath: string;
/**
* accessToken
*/
token: string;
}
export type { UserInfo };
/** 权限信息 */
interface AuthPermissionInfo {
user: UserInfo;
roles: string[];
permissions: string[];
menus: AppRouteRecordRaw[];
}
/** 路由元信息 */
interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
children?: AppRouteRecordRaw[];
component?: any;
componentName?: string;
components?: any;
fullPath?: string;
icon?: string;
keepAlive?: boolean;
meta: RouteMeta;
name: string;
parentId?: number;
props?: any;
sort?: number;
visible?: boolean;
}
export type { UserInfo, AuthPermissionInfo, AppRouteRecordRaw };