hurx il y a 1 semaine
Parent
commit
b426b3834b
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/views/bill/statementInvoice/addInvoiceDialog.vue

+ 6 - 0
src/views/bill/statementInvoice/addInvoiceDialog.vue

@@ -175,6 +175,12 @@ const beforeUpload = (file: any) => {
 /** 上传成功回调 */
 function handleUploadSuccess(response: any, file: any, fileListParam: any[]) {
   if (response.code === 200) {
+    // 为每个上传成功的文件设置 url 属性
+    fileListParam.forEach((f: any) => {
+      if (f.response?.code === 200 && f.response?.data?.url) {
+        f.url = f.response.data.url;
+      }
+    });
     // 更新 fileList
     fileList.value = fileListParam;
     // 收集所有已上传成功的文件URL