From 6fa9f903715673d4a556b960f81904005318913a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Sun, 10 Mar 2024 09:26:13 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=96=87=E6=A1=A3=E6=8B=86=E5=88=86--?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B--=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../splitUpload/SplitAddClauseUploadImage.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue b/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue index a367d91..5a2d2db 100644 --- a/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue +++ b/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue @@ -79,6 +79,12 @@ export default { const fileNowTypes = file.type.split('/') fileFlag = (fileTypes[0] === fileNowTypes[0]) // console.log('filetype',fileFlag) + const fileSize = file.size // 上传的文件大小 + if (fileSize > 1024 * 1024 * 500) { + this.$message.warning(this.$t('uploadFile.maxSize')) + this.fileTypeSatus = false + return false + } if (!fileFlag) { this.$message.warning(this.$t('文件格式不正确,请上传图片格式文件')) this.fileTypeSatus = false @@ -87,11 +93,10 @@ export default { if (this.uploadFileFlag < 20) { this.uploadFileFlag++ } - this.fileTypeSatus = true this.$message.destroy() // 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量! - this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!' + this.errorMessage = file.name + '文件大小超出500MB限制, 请压缩或降低文件质量!' } }, remove () { @@ -107,7 +112,7 @@ export default { } }) if (this.fileTypeSatus) { - if (file.size > 1000000000) { + if (file.size > 500000000) { this.$message.warning(this.errorMessage) } else { if (status === 'error') {