Преглед на файлове

fix: 上传文件大小提示错误修复

zhangjie преди 6 месеца
родител
ревизия
376fcef5bd
променени са 4 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      src/components/SelectFile.vue
  2. 1 1
      src/components/UploadFetchFile.vue
  3. 1 1
      src/components/UploadFileView.vue
  4. 1 1
      src/modules/stmms/components/SelectFile.vue

+ 1 - 1
src/components/SelectFile.vue

@@ -71,7 +71,7 @@ export default {
 
       if (file.size > this.maxSize) {
         this.errorMsg =
-          "文件大小不能超过" + Math.floor(this.maxSize / 1024) + "M";
+          "文件大小不能超过" + Math.floor(this.maxSize / (1024 * 1024)) + "M";
         this.$emit("file-change", { errorMsg: this.errorMsg });
         return;
       }

+ 1 - 1
src/components/UploadFetchFile.vue

@@ -112,7 +112,7 @@ export default {
     },
     handleExceededSize() {
       const content =
-        "文件大小不能超过" + Math.floor(this.maxSize / 1024) + "M";
+        "文件大小不能超过" + Math.floor(this.maxSize / (1024 * 1024)) + "M";
       this.res = {
         success: false,
         message: content,

+ 1 - 1
src/components/UploadFileView.vue

@@ -183,7 +183,7 @@ export default {
     },
     handleExceededSize() {
       const content =
-        "文件大小不能超过" + Math.floor(this.maxSize / 1024) + "M";
+        "文件大小不能超过" + Math.floor(this.maxSize / (1024 * 1024)) + "M";
       this.res = {
         success: false,
         message: content,

+ 1 - 1
src/modules/stmms/components/SelectFile.vue

@@ -71,7 +71,7 @@ export default {
 
       if (file.size > this.maxSize) {
         this.errorMsg =
-          "文件大小不能超过" + Math.floor(this.maxSize / 1024) + "M";
+          "文件大小不能超过" + Math.floor(this.maxSize / (1024 * 1024)) + "M";
         this.$emit("file-change", { errorMsg: this.errorMsg });
         return;
       }