fix(upload): type definition of beforeUpload (#30213)

This commit is contained in:
hello-chinese 2021-04-20 19:31:28 +08:00 committed by GitHub
parent 328e2b6252
commit a836b582ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ export interface UploadProps<T = any> {
showUploadList?: boolean | ShowUploadListInterface; showUploadList?: boolean | ShowUploadListInterface;
multiple?: boolean; multiple?: boolean;
accept?: string; accept?: string;
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | {} | Promise<void | Blob | File>; beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | string | Promise<void | Blob | File>;
onChange?: (info: UploadChangeParam) => void; onChange?: (info: UploadChangeParam) => void;
listType?: UploadListType; listType?: UploadListType;
className?: string; className?: string;