Explorar o código

update pc_chat

luke %!s(int64=6) %!d(string=hai) anos
pai
achega
5503555c32
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      pc_chat/src/components/chat.vue

+ 2 - 0
pc_chat/src/components/chat.vue

@@ -714,9 +714,11 @@
 
 				if (!isJPG) {
 					this.$message.error('上传只能是图片格式!');
+					return false;
 				}
 				if (!isLt2M) {
 					this.$message.error('上传图片大小不能超过 2MB!');
+					return false;
 				}
 				//对图片进行压缩
 				const imgSize = file.size / 1024 / 1024;