ソースを参照

上传文件修改

duy 2 ヶ月 前
コミット
8bb7670c5b
1 ファイル変更3 行追加1 行削除
  1. 3 1
      src/views/data-fill/components/HcUpload.vue

+ 3 - 1
src/views/data-fill/components/HcUpload.vue

@@ -328,7 +328,9 @@ const submitUpload = async () => {
   fileListData.value.forEach((file) => {
 
     
-    formData.append('files', file.raw ) // 确保 file.raw 是 File 对象
+  if (file.raw !== undefined) {
+      formData.append('files', file.raw) // 确保 file.raw 是 File 对象
+    }
   })
 
 console.log( fileListData.value, ' fileListData.value')