mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-25 00:00:53 +00:00
feat: 小文件增加上传进度展示 (#3133)
Refs https://github.com/1Panel-dev/1Panel/issues/3030
This commit is contained in:
@@ -174,7 +174,13 @@ const submit = async () => {
|
||||
} else {
|
||||
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++;
|
||||
uploaderFiles.value[i].status = 'success';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user