data-vis-ui
Version:
## [使用文档](https://temp-static-domain.jd.com/data-vis-ui)
42 lines (37 loc) • 997 B
TypeScript
import { ParamsType } from '@ant-design/pro-provider/lib/index';
import type { ProTableProps, ProColumns } from '@ant-design/pro-table';
export declare type SortOrder = 'descend' | 'ascend' | null;
/**
* Make all properties in T optional
*/
type Partial<T> = {
[P in keyof T]?: T[P];
};
export type RequestData<T> = {
data: T;
msg?: string;
code?: string;
} & Record<string, any>;
export type ListData = {
header: HeaderItem[];
content: Record<string, any>;
pageNo: number;
pageSize: number;
total: number;
};
export interface ITableProps<T, U, ValueType = 'text'> extends ProTableProps<T, U, ValueType> {
request?: (
params: U & {
pageSize?: number;
current?: number;
keyword?: string;
},
sort?: Record<string, SortOrder>,
filter?: Record<string, React.ReactText[] | null>,
) => Promise<Partial<RequestData<T>>>;
}
/** 和后端规定的表格的样式 */
export type HeaderItem = {
id: string | number;
name: string | number;
};