refactor(project): simplified part of the package, code optimization

This commit is contained in:
vben
2024-07-13 16:35:47 +08:00
parent 5784d718c0
commit daa31f7156
92 changed files with 318 additions and 546 deletions

View File

@@ -1,4 +1,2 @@
export type * from './router';
export type * from './ui';
export type * from './user';
export type * from '@vben-core/typings';

View File

@@ -1,13 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import type { Component } from 'vue';
// 定义递归类型以将 RouteRecordRaw 的 component 属性更改为 string
type RouteRecordStringComponent<T = string> = {
children?: RouteRecordStringComponent<T>[];
component: T;
} & Omit<RouteRecordRaw, 'children' | 'component'>;
type ComponentRecordType = Record<string, () => Promise<Component>>;
export type { ComponentRecordType, RouteRecordStringComponent };

View File

@@ -1,11 +0,0 @@
interface SelectListItem {
label: string;
value: string;
}
interface TabsItem {
label: string;
value: string;
}
export type { SelectListItem, TabsItem };

View File

@@ -1,9 +1,7 @@
import type { BasicUserInfo } from '@vben-core/typings';
/** 用户信息 */
interface UserInfo {
/**
* 头像
*/
avatar: string;
interface UserInfo extends BasicUserInfo {
/**
* 用户描述
*/
@@ -12,26 +10,11 @@ interface UserInfo {
* 首页地址
*/
homePath: string;
/**
* 用户昵称
*/
realName: string;
/**
* 用户角色信息
*/
roles: string[];
/**
* accessToken
*/
token: string;
/**
* 用户id
*/
userId: string;
/**
* 用户名
*/
username: string;
}
export type { UserInfo };