the uploaded tag reads like this.
<el-upload
class="upload-demo"
ref="uploadNewFile"
:action="actionUrl"
:file-list="fileList"
:auto-upload="false"
:on-change="newFileChange"
:on-remove="removeFile"
:data="newFileData"
name="files"
:on-preview="handlePreview">
<el-button type="primary" class="button b2 upload">
<i class="iconfont icon-shangchuan"></i>
</el-button>
<el-input style="display: none" v-model="formData.newFile"></el-input>
</el-upload>
when submitting
saveIt: function () {
this.$refs["newAddForm"].validate((valid) => {
if(valid){
if (this.fileNameCheckFlag) {
this.newFileData.dictionaryName = this.formData.fileName;
this.newFileData.indexName = this.formData.fileName;
this.newFileData.isPublish = false;
this.newFileData.menuId = 256;
this.$refs["newAddForm"].resetFields();
this.zDialog.showAdd = false;
this.$refs.uploadNewFile.submit();
}
}
but when uploading files and submitting them, you need to bring this.newFileData.title (file name) and this.newFileData.sort (file sorting number).
how do you assign the file name and file sorting number when uploading multiple files? Where is the assignment?