import React from 'react'; export declare type UploadReady = 'ready' | 'uploading' | 'success' | 'error'; export interface FileInfoProps { uid: string; name: string; size: number; precentage: number; status: UploadReady; } export interface UploadProps { /** 上传地址 */ action: string; /** 上传进程 */ onProgress?: (percentage: number, file: File) => void; /** 上传成功回调 */ onSuccess?: (res: any, file: File) => void; /** 上传失败回调 */ onError?: (res: any, file: File) => void; /** 数据改变之后的回调 */ onChange?: (file: File) => void; /** 上传前的钩子函数 */ beforeUpload?: (fileList: FileList) => boolean | Promise; /** 移出文件后的回调函数 */ onremove?: (file: FileInfoProps) => void; /** 上传的文件名称 */ name?: string; /** 修改的头部信息 */ headers?: { [key: string]: any; }; /** 是否携带cookie*/ withCredentials?: boolean; /** 支持的格式 */ accept?: string; /** 是否支持多选 */ multiple?: true; /** 要上传的数据 */ data?: { [key: string]: any; }; /** 是否拖拽上传 */ drag?: boolean; } /** * ### Upload的使用方法 * ~~~js * import { Upload } from 'hongguang-style' * ~~~ */ export declare const Upload: React.FC;