Showing
1 changed file
with
6 additions
and
5 deletions
| ... | @@ -175,7 +175,7 @@ export default { | ... | @@ -175,7 +175,7 @@ export default { |
| 175 | let fileSum = 0; | 175 | let fileSum = 0; |
| 176 | let fileSize = 0; | 176 | let fileSize = 0; |
| 177 | let fileNameArray = []; | 177 | let fileNameArray = []; |
| 178 | - let errorTip = ""; | 178 | + let errorTip = this.errorTip; |
| 179 | this.fileData.forEach((item) => { | 179 | this.fileData.forEach((item) => { |
| 180 | fileSum = Number(fileSum) + Number(item.files.length); | 180 | fileSum = Number(fileSum) + Number(item.files.length); |
| 181 | item.files.forEach((file) => { | 181 | item.files.forEach((file) => { |
| ... | @@ -185,16 +185,17 @@ export default { | ... | @@ -185,16 +185,17 @@ export default { |
| 185 | }); | 185 | }); |
| 186 | if (fileSum + 1 > 100) { | 186 | if (fileSum + 1 > 100) { |
| 187 | if (this.errorTip == "") { | 187 | if (this.errorTip == "") { |
| 188 | - errorTip = "The total number of uploaded files should not exceed 100 files."; | 188 | + errorTip = |
| 189 | - this.$message.warning(this.errorTip); | 189 | + "The total number of uploaded files should not exceed 100 files."; |
| 190 | } | 190 | } |
| 191 | } else if ((Number(fileSize) + Number(val.size)) / 1024 / 1024 > 95) { | 191 | } else if ((Number(fileSize) + Number(val.size)) / 1024 / 1024 > 95) { |
| 192 | if (this.errorTip == "") { | 192 | if (this.errorTip == "") { |
| 193 | - errorTip = "The total size of all uploaded files should not exceed 95MB."; | 193 | + errorTip = |
| 194 | + "The total size of all uploaded files should not exceed 95MB."; | ||
| 194 | } | 195 | } |
| 195 | } else if (fileNameArray.includes(val.name)) { | 196 | } else if (fileNameArray.includes(val.name)) { |
| 196 | if (this.errorTip == "") { | 197 | if (this.errorTip == "") { |
| 197 | - errorTip = "Duplicate file name uploaded!"; | 198 | + errorTip = `'${val.name}'.Duplicate file name uploaded!`; |
| 198 | } | 199 | } |
| 199 | } | 200 | } |
| 200 | 201 | ... | ... |
-
Please register or login to post a comment