update: 兼容旧版本上传 增加ImageUploadOld/FileUploadOld(下个版本将移除)
This commit is contained in:
@@ -286,9 +286,10 @@ export function useUpload(
|
||||
const percent = Math.trunc((e.loaded / e.total!) * 100);
|
||||
info.onProgress!({ percent });
|
||||
};
|
||||
const res = await api(info.file as File, props?.data ?? {}, {
|
||||
const res = await api(info.file as File, {
|
||||
onUploadProgress: progressEvent,
|
||||
signal: uploadAbort.signal,
|
||||
otherData: props?.data,
|
||||
});
|
||||
info.onSuccess!(res);
|
||||
if (props.showSuccessMsg) {
|
||||
|
Reference in New Issue
Block a user