瀏覽代碼

fix 修复 文件/图片上传组件 第一次上传报错导致后续上传无限loading问题

疯狂的狮子li 3 年之前
父節點
當前提交
2b866f93e3
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 1
      ruoyi-ui/src/components/FileUpload/index.vue
  2. 1 0
      ruoyi-ui/src/components/ImageUpload/index.vue

+ 2 - 1
ruoyi-ui/src/components/FileUpload/index.vue

@@ -156,7 +156,7 @@ export default {
     // 上传失败
     handleUploadError(err) {
       this.$modal.msgError("上传图片失败,请重试");
-      this.$modal.closeLoading()
+      this.$modal.closeLoading();
     },
     // 上传成功回调
     handleUploadSuccess(res) {
@@ -172,6 +172,7 @@ export default {
       } else {
         this.$modal.msgError(res.msg);
         this.$modal.closeLoading();
+        this.number--;
       }
     },
     // 删除文件

+ 1 - 0
ruoyi-ui/src/components/ImageUpload/index.vue

@@ -143,6 +143,7 @@ export default {
       } else {
         this.$modal.msgError(res.msg);
         this.$modal.closeLoading();
+        this.number--;
       }
     },
     // 上传前loading加载