vue-simple-uploader组件的一些使用心得

更新时间:2023-05-28 08:28:11 阅读: 评论:0

this.fileList[index].filePath = null;
this.fileList[index].coverPath = null;
this.fileList[index].progress = 100;
this.fileList[index].status = "success";
this.fileList[index].state = 1;
this.fileList[index].isPlayOrPau=fal;
this.fileList[index].showPP = fal;四级 听力
}
}el{
末路狂澜
EventBus.$emit('alert.show', {type: 'error', msg: sult});
bridge是什么意思if(index > -1){
this.fileList[index].status = 'fail';
this.fileList[index].state = 2;
this.fileList[index].isPlayOrPau=fal;
this.fileList[index].showPP = fal;
}
曼谷奔逃}
})
}
},miz
onFileError(rootFile, file, respon, chunk){
let res = JSON.par(respon)
在线翻译 日语EventBus.$emit('alert.show', {type: 'error', msg: sult});
let index = this.findFileById(file.uniqueIdentifier);
if(index > -1){
this.fileList[index].status = 'fail';女人易怒
this.fileList[index].state = 2;
this.fileList[index].isPlayOrPau=fal;
this.fileList[index].showPP = fal;
}
},
onFileProgress(rootFile, file, chunk){
let index = this.findFileById(file.uniqueIdentifier),
p = und(file.progress()*100);
if(index > -1){
if(p < 100){
this.fileList[index].progress = p;南非前总统曼德拉
}
this.fileList[index].status = file.status;
}
toes},
谷歌翻译软件myMD5(file) {//这⾥主要是使⽤MD5对⽂件做⼀个上传的查重
let md5 = "";
md5 = SparkMD5.hash(file.name);//业务需求以⽂件名作为加密
let index = this.findFileById(md5);
if(index==-1){
file.uniqueIdentifier = md5;
this.fileList.push({
id: null,
uid: file.uniqueIdentifier,
filePath: '',
coverPath: '',
name: file.name,
resName: '',
progress: 0,
state: 0,
status: '',
isPlayOrPau:true,
showPP:true,
elMD5:md5  //多余的参数可注释
});
//继续上传⽂件
}el{
EventBus.$emit('alert.show', {type: 'warning', msg: `该⽂件已上传⾄列表,请勿重复上传`});
file.ignored = true//⽂件过滤
}
},
playFile(e,f){
e.stopPropagation();
f.isPlayOrPau=true
const uploaderInstance = this.$refs.uploader.uploader
let index = uploaderInstance.fileList.findIndex(e => e.uniqueIdentifier === f.uid)//兼容点击上传按钮

本文发布于:2023-05-28 08:28:11,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/125546.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:上传   狂澜   曼谷   总统   软件   需求   加密   注释
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图