`
this.$http({ method:'post', url:url, data:data, headers: { 'Content-Type': 'application/json; application/octet-stream', onDownloadProgress: progressEvent \=> { var complete = readablizeBytes(progressEvent.loaded) this.loadeds = complete } }, responseType: 'blob', }).then(res\=>{ let blobUrl \= new Blob(\[res.data\], {type: 'application/zip'}) let a \= document.createElement('a'); let url \= window.URL.createObjectURL(blobUrl); a.href \= url; a.download \= d; a.click(); window.URL.revokeObjectURL(url); }).catch(error\=>{ this.$message({ message:res.data.message, type:"error", duration:1000 }); })
`
我想显示下载进度,但是在axios的onDownloadProgress这个里面赋值不生效,控制true和false也不生效,但是console到控制台true和false是改后的,页面中不会显示出这个数值,但是console到控制台可以显示出来,这是什么原因呢?
待解决
悬赏分:80
- 离问题结束还有 239天19小时15分7秒
点赞 0反对 0举报 0
收藏 0
分享 0
