使用element的upload上传时报错
出现这种错通常是你的数据和需要的数据格式不匹配
查看官网发现需要的是这种格式[{},{}]
我的代码 输出的是[‘url1’,‘url2’]
正确代码
handlesuccess(res, file, fileList) {
var that = this
// that.fileList.push(res.info.url) //['url1','url2'] 错误的
var lists = {
"name": res.info.name,
"url": res.info.url
}
that.fileList.push(lists)
},