浏览代码

feat(组件): 修改上传

tangning 2 年之前
父节点
当前提交
9384323926
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/components/Upload/src/UploadModal.vue

+ 1 - 2
src/components/Upload/src/UploadModal.vue

@@ -223,7 +223,6 @@
           );
           item.status = UploadResultStatus.SUCCESS;
           item.responseData = data;
-
           if (afterFetch && isFunction(afterFetch)) {
             item.responseData = (await afterFetch(data)) || data;
           }
@@ -284,7 +283,7 @@
         for (const item of fileListRef.value) {
           const { status, responseData } = item;
           if (status === UploadResultStatus.SUCCESS && responseData) {
-            fileList.push(responseData.message);
+            fileList.push(responseData.message || responseData.url);
           }
         }
         // 存在一个上传成功的即可保存