5.获取上传进度并转化成百分比
//文件上传中
uploadIng(event, file, fileList) {
this.uploadPercent.push(file);
if (event.lengthComputable) {
file.progress = Math.round((event.loaded / event.total) * 100);
// 页面只触发一次 需要加上这个forceUpdate 如果是是实时更新 就不需要加
this.$forceUpdate()
}
},
文件列表上传进度
最新推荐文章于 2024-07-20 10:36:53 发布