qinhouyu hace 1 año
padre
commit
258d83dc19
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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;
           });