|
@@ -372,7 +372,7 @@ interface IUpload {
|
|
|
validate?(files: File[]): string | boolean;
|
|
|
|
|
|
/** 自定义上传,当发生错误时返回错误信息 */
|
|
|
- handler?(files: File[]): string | null;
|
|
|
+ handler?(files: File[]): string | null | Promise<string> | Promise<null>;
|
|
|
|
|
|
/** 对服务端返回的数据进行转换,以满足内置的数据结构 */
|
|
|
format?(files: File[], responseText: string): string;
|
|
@@ -381,7 +381,7 @@ interface IUpload {
|
|
|
linkToImgFormat?(responseText: string): string;
|
|
|
|
|
|
/** 将上传的文件处理后再返回 */
|
|
|
- file?(files: File[]): File[];
|
|
|
+ file?(files: File[]): File[] | Promise<File[]>;
|
|
|
|
|
|
/** 图片地址上传后的回调 */
|
|
|
linkToImgCallback?(responseText: string): void;
|