소스 검색

文件提示

qinhouyu 1 년 전
부모
커밋
258d83dc19
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/components/ObsImageUpload/indexFile.vue

+ 3 - 1
src/components/ObsImageUpload/indexFile.vue

@@ -125,7 +125,9 @@ export default {
           // 然后将数组转为对象数组
           return list.map(item => {
             if (typeof item == "object") {
-              item = { name: item.fileName, url: item.picUrl };
+              if (item.hasOwnProperty('fileName')&&item.hasOwnProperty('picUrl')) {
+                item = {name: item.fileName, url: item.picUrl};
+              }
             }
             return item;
           });