import type { FormInstance } from 'antd/es/form'; import type { UseFormFetchOption } from '../useFormFetch'; export interface UseTableListOption extends Omit { /** * 表单实例 */ form?: FormInstance; /** * 请求函数 */ request: (values: FormValues) => Promise; /** * 默认参数 * @description 这个适合页面进来就需要预置的参数 */ defaultParams?: Partial; /** * 自定义参数 */ formatParams?: (v: FormValues) => FormValues; /** * 获取列表 用于返回数据是一个对象的情况 */ findListData?: (data: any) => ListItem[]; } declare const useTableList: ({ request, defaultParams, formatParams, findListData, ...restOptions }: UseTableListOption) => { onSubmit: () => void; onReset: () => void; refresh: () => void; tableProps: { loading: boolean; dataSource: ListItem[]; }; searchObject: Record; responseData: any; }; export default useTableList;