feat:限制文件大小为200M
Showing
1 changed file
with
5 additions
and
0 deletions
... | @@ -256,6 +256,11 @@ export default { | ... | @@ -256,6 +256,11 @@ export default { |
256 | this.$message.error('支持文件为pdf格式') | 256 | this.$message.error('支持文件为pdf格式') |
257 | return | 257 | return |
258 | } | 258 | } |
259 | // 大小限制为200M | ||
260 | if (file.size > 200 * 1024 * 1024) { | ||
261 | this.$message.error('文件大小限制为200M') | ||
262 | return | ||
263 | } | ||
259 | if (this.fileList[this.currentFileIndex].name) { | 264 | if (this.fileList[this.currentFileIndex].name) { |
260 | await this.uploadConfirm() | 265 | await this.uploadConfirm() |
261 | } | 266 | } | ... | ... |
-
Please register or sign in to post a comment