| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /**
- * 数据过滤项
- */
- export interface FilterValue<T> {
- keys: (keyof T)[], // 多条件字段
- filteredValue: (T[keyof T])[], // 多选过滤或模糊查询
- }
- /**
- * 过滤选项
- */
- export interface FilterOptions<T> {
- selectList: FilterSelect<T>[],
- inputList: FilterInput<T>[],
- buttonList: FilterButton[]
- }
- /**
- * 过滤选择框
- */
- export interface FilterSelect<T> {
- key: keyof T,
- label?: string,
- selectedValue?: T[keyof T],
- locked?: boolean, // 重置时是否阻止清空当前值
- placeholder?: string,
- options: {
- label: string,
- value: T[keyof T],
- }[],
- onChange?: (value: T[keyof T]) => void
- }
- /**
- * 过滤输入框
- */
- export interface FilterInput<T> {
- keys: (keyof T)[],
- label?: string,
- value?: T[keyof T],
- locked?: boolean, // 重置时是否阻止清空当前值
- type?: 'text' | 'number',
- placeholder?: string
- }
- /**
- * 过滤按钮
- */
- export interface FilterButton {
- lable: string;
- className?: string;
- onClick: () => void;
- }
- /**
- * 数据表配置项
- */
- export interface DataTableOptions {
- pagination?: boolean; // 是否进行本地分页
- pageSize?: number; // 每页条数
- pageIndex?: number; // 当前页码
- }
|