feat: login

This commit is contained in:
2025-09-09 16:58:30 +08:00
parent d6457f59f7
commit f33f597a9a
41 changed files with 10998 additions and 3594 deletions

78
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,78 @@
export {};
declare global {
interface Fn<T = any> {
(...arg: T[]): T;
}
type Nullable<T> = T | null;
type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
type Recordable<T = any, K = string> = Record<
K extends null | undefined ? string : K,
T
>;
type ComponentRef<T> = InstanceType<T>;
type LocaleType = "zh-CN" | "en";
declare type TimeoutHandle = ReturnType<typeof setTimeout>;
declare type IntervalHandle = ReturnType<typeof setInterval>;
type AxiosHeaders =
| "application/json"
| "application/x-www-form-urlencoded"
| "multipart/form-data";
type AxiosMethod =
| "get"
| "post"
| "delete"
| "put"
| "GET"
| "POST"
| "DELETE"
| "PUT";
type AxiosResponseType =
| "arraybuffer"
| "blob"
| "document"
| "json"
| "text"
| "stream";
interface AxiosConfig {
params?: any;
data?: any;
url?: string;
method?: AxiosMethod;
headersType?: string;
responseType?: AxiosResponseType;
}
interface IResponse<T> {
code: string;
data: T;
msg: string;
}
interface PageParam {
pageSize?: number;
pageNo?: number;
total?: number;
}
interface Tree {
id: number;
name: string;
children?: Tree[] | any[];
}
// 分页数据公共返回
interface PageResult<T> {
list: T; // 数据
total: number; // 总量
msg: string;
}
}