element ui上傳組件,開(kāi)啟多圖上傳時(shí)報錯,列表顯示一個(gè)成功,實(shí)際圖片都已經(jīng)上傳成功。
報錯如下:
Uncaught TypeError: Cannot set properties of null (setting 'status')
解決方法
:file-list="imageList"
指定文件列表為imageList
另外定義images數組字段接收服務(wù)器返回值
將顯示和數據區分,提交表單時(shí)只需要提交images數組。
handleImageSuccess(res, file, fileList) {
this.imageList = fileList;
this.images.push({
name: file.name,
url: file.url,
path: res.data.path
});
},
- 版權所有:奇站網(wǎng)絡(luò ) 轉載請注明出處
- 廈門(mén)奇站網(wǎng)絡(luò )科技有限公司,專(zhuān)業(yè)提供網(wǎng)站建設,響應式網(wǎng)站建設,小程序開(kāi)發(fā),系統定制開(kāi)發(fā)。
- 軟件開(kāi)發(fā)咨詢(xún)熱線(xiàn):吳小姐 13313868605