feat(types): 修补缺失的API通用类型定义
This commit is contained in:
44
src/types/api/index.ts
Normal file
44
src/types/api/index.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
export interface PageQueryParams {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
||||
export interface OptionItem {
|
||||
label: string;
|
||||
value: string | number;
|
||||
meta?: any;
|
||||
children?: OptionItem[];
|
||||
}
|
||||
|
||||
export interface ExcelResult {
|
||||
/** 状态码 */
|
||||
code: number;
|
||||
/** 无效数据条数 */
|
||||
invalidCount: number;
|
||||
/** 有效数据条数 */
|
||||
validCount: number;
|
||||
/** 错误信息 */
|
||||
messageList: Array<string>;
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
export interface ApiResponse<T = any> {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
export interface BaseEntity {
|
||||
id: number;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user