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;
           });