UNPKG

@aplus-frontend/ui

Version:

74 lines (73 loc) 1.68 kB
import { ApBatchActionGroupButtonProps } from '../ap-batch-action-group'; export type ApExportGroupProps = { /** * 类型 */ type?: 'button' | 'dropdown' | 'group'; /** * 选中行的Key列表 */ selectedRowKeys?: any[]; /** * 类型为group时配置,适用于多导出 */ groupList?: ApExportGroupListItem[]; /** * 类型为group时配置,和批量操作按钮组buttonProps一致 */ buttonProps?: ApBatchActionGroupButtonProps; } & ApExportGroupListItem; export interface ApExportGroupListItem { /** * 是否禁用 */ disabled?: boolean; /** * 权限 */ auth?: string; /** * 是否显示 */ ifShow?: () => boolean; /** * 导出按钮文案 */ text?: string; /** * 导出所选 Key 的取值,默认为 ids */ idKey?: string; /** * 导出接口 */ request?: (key: any) => Promise<any>; /** * 导出接口参数 */ getRequestParams?: () => Record<string, any>; /** * 初始化参数 */ getInitialParams?: () => Record<string, any>; beforeRequest?: (params: any) => Record<string, any>; successMessage?: boolean | string; /** * 导出字段 */ exportField?: boolean | { key?: string; convertField?: { [key: string]: string[]; }; }; } export declare enum ApExportGroupActionType { ALL = "ALL", SELECT = "SELECT" } export type ApExportGroupAntMenuInfo = { key: string | number; option?: ApExportGroupListItem; }; export type ApExportGroupMixedParams<ParamsType> = Partial<ParamsType>;