From 8cf172365fc988cff400468c28a28bc5c5e327b4 Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 9 Apr 2024 09:22:43 +0800 Subject: [PATCH] =?UTF-8?q?15032=20=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F=20?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classMessage/classMessage/components/updatePhoto.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/classMessage/classMessage/components/updatePhoto.vue b/src/views/classMessage/classMessage/components/updatePhoto.vue index eb54701..538dc4c 100644 --- a/src/views/classMessage/classMessage/components/updatePhoto.vue +++ b/src/views/classMessage/classMessage/components/updatePhoto.vue @@ -39,6 +39,13 @@ export default { this.visible = false }, save() { + if (!this.fileList || !this.fileList.length || this.fileList.length === 0) { + this.$message({ + type: 'error', + message: '请上传图片!' + }) + return + } this.loading = true const formData = new FormData() formData.append('PHOTO', this.fileList[0].raw)