Memo

20230819 n8k2umh8

fetch-progress 让 fetch 也能有 onProgress 回调。 `js fetch(this.props.src) .then( fetchProgress({ // implement onProgress method onProgress(progress) { console.log({ progress }); // A possible...

fetch-progress 让 fetch 也能有 onProgress 回调。

fetch(this.props.src)
 .then(
 fetchProgress({
 // implement onProgress method
 onProgress(progress) {
 console.log({ progress });
 // A possible progress report you will get
 // {
 // total: 3333,
 // transferred: 3333,
 // speed: 3333,
 // eta: 33,
 // percentage: 33
 // remaining: 3333,
 // }
 },
 })
 )