the desired effect is that the file selected by the user is uploaded one interface at a time, but the element ui is uploaded in the form of one file at a time
the API with 4 parameters has been called for many times to upload. I want to upload more than one file at a time.
because the list in element ui is inconsistent with our requirements, I rewrote a list
<el-upload
class="upload-demo"
ref="upload"
drag
:data="Aobject"
:on-success="handleAvatarSuccess"
:auto-upload="false"
:before-remove="beforeRemove"
:show-file-list="false"
:on-change="handleChange"
:on-remove="handleRemove"
:action="actionUrl"
multiple
:on-exceed="onExceed"
:limit="limit"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text"><em></em></div>
</el-upload>
<ul class="ul_two">
<li v-for="(item,key) in FileList">
<img :src="Image(item)" alt="" />
<span>{{item.name}}</span>
<i class="el-icon-circle-close-outline delClass" @click="del(item,key)"></i>
<i class="el-icon-loading zhuanClass" v-if="item.wait"></i>
<i class="el-icon-success zhuanClass"style="color: -sharp01C001;" v-if="item.Success"></i>
</li>
</ul>
FileList is when I push the data every time the user selects a file
handleChange(res, file){ //
let Status=null;
this.TitleNameDisplay=true;
this.TitleName=res.name;
this.Arraya=file;
Status=this.wenjian(res.name);
if(res.status == "ready"){ //
this.FileList.push({
name:res.name.substring(0, res.name.lastIndexOf(".")),
status:Status,
wait:false,
Success:false
})
}
if(this.Name == null ||this.Name == undefined){
this.Name=this.FileList[0].name;
}
},
scuuse(){
this.Zhuan=true;
const _id=this.$route.query.id;
const _this=this;
for(var i=0;i<this.FileList.length;iPP){
this.FileList[i].wait =true;
}
let promise = new Promise(function(resolve, reject) {
_this.actionUrl=`/chaoyang/api/dailyInfo/createDailyInfo/${_id}`;
_this.Aobject.name=_this.Name;//
resolve();
});
promise.then(function() {
_this.$refs.upload.submit();
});
}
how can I use element ui to upload multiple files on one interface?