UNPKG

@aplus-frontend/ui

Version:

38 lines (37 loc) 1.24 kB
import { ApGridExpose, ApGridProps } from '../../ap-grid'; export interface UsePageListApGrid extends ApGridProps { /** 是否显示默认的行选择配置 * @default true */ isShowRowSelection?: boolean; /** 转化ApGrid查询参数 */ transformSearchFormValues?: (values: any) => any; /** ApGrid数据接口 */ api?(record: any): Promise<any>; /** 发起请求的时候情况行选中 * @default true */ clearSelectionOnRequest?: boolean; /** 用于覆盖默认的class */ class?: string; /** * 表格刷新相关 */ tableRefresh?: boolean | (() => boolean); /** 是否需要在deactivated的时候清空数据 * @default true */ clearDataOnDeactivated?: boolean; } /** * 集成了列表页面的ApGrid的默认配置 * 表格分页器吸底效果,表格可拖动,表格行选择等 */ export declare function usePageListApGrid(props?: UsePageListApGrid): [ApGridProps, { reload: () => void; reset: () => void; getSearchFormValues: (transform?: boolean) => any; getApGridInstance: () => ApGridExpose | undefined; getSearchFormValuesAndSorted: (transform?: boolean) => any; clearSelection: () => void; }];