qinhouyu 1 vuosi sitten
vanhempi
commit
258d83dc19
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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;
           });