@lovelope/table-factory
Version:
Combinable higher order components for list.
34 lines • 914 B
TypeScript
import React from 'react';
/**
* 分页字段映射
* @interface PaginationEnums
* @param {string} page 页数
* @param {string} pageSize 分页大小
*/
export interface PaginationEnums {
page: string;
pageSize: string;
}
interface Data {
[key: string]: unknown;
}
interface ResponseData {
[k: string]: unknown;
data?: Data;
}
interface WrapperComponentProps {
}
export interface TableFactoryProps {
immediate?: boolean;
enums?: PaginationEnums;
mute?: string[];
getAction: (params?: unknown) => Promise<ResponseData>;
params?: {
[key: string]: unknown;
};
format?: (v: unknown) => unknown;
}
export type TableFactoryType = (props: TableFactoryProps) => (Component: React.ComponentType<WrapperComponentProps>) => React.ComponentType;
declare const TableFactory: TableFactoryType;
export default TableFactory;
//# sourceMappingURL=table-factory.d.ts.map