Kaynağa Gözat

上传单个图片部分修改

wangyani 11 ay önce
ebeveyn
işleme
d89c797d48
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      src/components/ImageUploadSingle/index.vue

+ 2 - 0
src/components/ImageUploadSingle/index.vue

@@ -174,12 +174,14 @@ export default {
         this.$modal.msgError(
           `文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`
         );
+        this.isVisible = true;
         return false;
       }
       if (this.fileSize) {
         const isLt = file.size / 1024 / 1024 < this.fileSize;
         if (!isLt) {
           this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
+           this.isVisible = true;
           return false;
         }
       }