mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 小文件增加上传进度展示 (#3133)
Refs https://github.com/1Panel-dev/1Panel/issues/3030
This commit is contained in:
parent
246115837e
commit
4daed1a3de
@ -174,7 +174,13 @@ const submit = async () => {
|
|||||||
} else {
|
} else {
|
||||||
formData.append('path', path.value);
|
formData.append('path', path.value);
|
||||||
}
|
}
|
||||||
await UploadFileData(formData, {});
|
await UploadFileData(formData, {
|
||||||
|
onUploadProgress: (progressEvent) => {
|
||||||
|
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
|
||||||
|
uploadPrecent.value = progress;
|
||||||
|
},
|
||||||
|
timeout: 40000,
|
||||||
|
});
|
||||||
success++;
|
success++;
|
||||||
uploaderFiles.value[i].status = 'success';
|
uploaderFiles.value[i].status = 'success';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user