, "", Axios . onUploadProgress onDownloadProgress
totalLength, : , lengthComputable, , ( ), , , .
! , .
, "" , setInterval, . , 100%. CSS, , ""
( GitHub), .
onUploadProgress: (progressEvent) => {
const totalLength = progressEvent.lengthComputable ? progressEvent.total : progressEvent.target.getResponseHeader('content-length') || progressEvent.target.getResponseHeader('x-decompressed-content-length');
console.log("onUploadProgress", totalLength);
if (totalLength !== null) {
this.updateProgressBarValue(Math.round( (progressEvent.loaded * 100) / totalLength ));
}
});