import { ClassValue, StyleValue, UploadInternalFileDetail, UploadInternalRawFile, UploadProps } from '@wakeadmin/element-adapter'; export interface FatImportEvents { onImportSuccess?: (result: FatImportSuccessResult) => void; onImportError?: (result: FatImportErrorResult) => void; onImportComplete?: (result: FatImportResult) => void; } export interface FatImportSuccessResult { status: 'success'; message?: string; /** * 额外数据,可以在 onSuccess 中获取到 */ extra?: any; } export interface FatImportErrorResult { status: 'error'; message?: string; /** * 失败详情数据 */ details?: { row: string | number; reason: string; }[]; /** * 额外数据,可以在 onError 中获取到 */ extra?: any; } export type FatImportResult = FatImportSuccessResult | FatImportErrorResult; export interface FatImportSlots { renderTitle?: () => any; renderMessage?: () => any; renderUploadMessage?: () => any; } export interface FatImportProps extends Omit, FatImportEvents, FatImportSlots { /** * 标题,默认为 批量导入 */ title?: any; /** * 提示消息 */ message?: any; /** * 上传提示消息,默认为 只能上传xlsx、xls格式文件 */ uploadMessage?: any; /** * 遵循 input#file 规范 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept * * 你也可以传入扩展名数组, 例如 [.jpg, .jpeg, .png]. * * NOTE: 传入扩展名数组,我们才会对文件类型进行校验,否则只是在系统文件选择器中进行筛选 * 默认为 [.xls, .xlsx] */ accept?: string | string[]; /** * 文件上传前置检查 */ beforeUpload?: (file: UploadInternalRawFile) => boolean | Promise; /** * 文件上传后处理 * 可以在这里对 file.response 进行处理, * @param file * @returns */ afterUpload?: (files: UploadInternalFileDetail[]) => Promise; /** * 自定义限额提示语, 在尺寸、大小不符合预期的情况下提示 */ limitMessage?: string; /** * 数量限制, 默认为 1 */ limit?: number; /** * 大小限制 */ sizeLimit?: number; modalClassName?: ClassValue; modalStyle?: StyleValue; } export declare const FatImport: import("@wakeadmin/h").DefineComponent void; importError: (result: FatImportErrorResult) => void; importComplete: (result: FatImportResult) => void; }, {}, { title: () => any; message: () => any; uploadMessage: () => any; }>; //# sourceMappingURL=index.d.ts.map