theme: 使用 fileList 对列表进行完全控制,若想使用自带的功能,如删除,那么必须将数据整理成如下格式:fileList: [
{
uid: '-1',
name: 'xxx.png',
status: 'done',
url: 'http://www.baidu.com/xxx.png',
response:{
name:'',
url:''
}
},
],
:data="{upload_sysName:'flc',upload_folder:'flAttachFile'}"
:action="apiUrl.uploadServlet"
@change="uploadChange"
:fileList="fileList"
:multiple="true"
>
<a-button>
<a-icon type="upload"/>
选择文件
</a-button>
</a-upload>
getFile(obj) {
this.show = true
const selectParameters = {
pageName: 'fl-attach-file',
formName: 'searchForm',
'flAttachFile.w_objId': obj.flTestPlan.infoId
}
getCommonList(selectParameters).then(res => {
this.fileList = []
if(res.rows.length >0){
res.rows.forEach(item => {
this.fileList.push({
uid: item.flAttachFile.infoId,
name: item.flAttachFile.attachName,
status: 'done',
url:item.flAttachFile.attachUrl,
response:{
fileNameOld:item.flAttachFile.attachName,
murl:item.flAttachFile.attachUrl
}
})
})
}
})