import { ReactNode } from 'react' import { Option } from '../AyForm/ay-form' import { TableRowSelection } from 'antd/lib/table/interface' import { AnyKeyProps } from '../types/AnyKeyProps' import { SizeType } from 'antd/lib/config-provider/SizeContext' export interface AyListProps { title?: string | ReactNode children?: ReactNode header?: ReactNode size?: SizeType api?(params: AnyKeyProps): Promise /** 列表项 */ fields: Array /** 列表数据 */ data?: Array /** 操作列 */ ctrl?: AyTableField /** 列表前面的 selection */ rowSelection?: TableRowSelection /** 列表查询完成监听 */ onLoad?(records: Array, data: any): void /** rowKey */ rowKey?: ((record: AnyKeyProps) => string) | string /** 加载玩数据过滤 */ filterData?(data: AnyKeyProps): AnyKeyProps /** 查询前过滤 */ beforeSearch?(data: AnyKeyProps): AnyKeyProps /** 分页参数 */ pagination?: any className?: string /** list 其它属性 */ listExtend?: AnyKeyProps /** 默认查询数据 */ defaultSearchValue?: AnyKeyProps /** 默认过滤参数 */ defaultFiltersValue?: AnyKeyProps /** 插入按钮 */ btnBefore?: ReactNode /** 是否展示导出按钮 */ exportVisible?: boolean /** 更多查询数据, 额外带的查询数据用 */ extendSearchParams?: AnyKeyProps /** 表格是否自动请求 */ autoload?: false /** 渲染元素 */ renderItem: (record: AnyKeyProps, index: number) => ReactNode /** 请求数据变化事件 */ onParamsChange?(params: AnyKeyProps): void /** 列表头部 */ listHeader?: ReactNode /** 提示文本 */ tooltip?: string } export interface AyTableProps { title?: string | ReactNode children?: ReactNode header?: ReactNode size?: SizeType api?(params: AnyKeyProps): Promise /** 列表项 */ fields: Array /** 列表数据 */ data?: Array /** 操作列 */ ctrl?: AyTableField /** 表格前面的 selection */ rowSelection?: TableRowSelection /** 表格查询完成监听 */ onLoad?(records: Array, data: any): void /** rowKey */ rowKey?: ((record: AnyKeyProps) => string) | string /** 横向滚动宽度 */ scrollX?: number /** 表格高度 */ height?: number /** 加载玩数据过滤 */ filterData?(data: AnyKeyProps): AnyKeyProps /** 查询前过滤 */ beforeSearch?(data: AnyKeyProps): AnyKeyProps /** 展开事件 */ onExpand?(expanded: boolean, record: AnyKeyProps): void /** 分页参数 */ pagination?: any className?: string /** table 其它属性 */ tableExtend?: AnyKeyProps /** 默认查询数据 */ defaultSearchValue?: AnyKeyProps /** 默认过滤参数 */ defaultFiltersValue?: AnyKeyProps /** 默认排序参数 */ defaultSortsValue?: Array<{ key: string; order: 'ascend' | 'descend' }> /** 在导入前面插入按钮 */ btnBefore?: ReactNode /** 统计数据,放在导入按钮前面 */ dataAnalysis?: Array