Browse Source

update pc_chat

luke 6 years ago
parent
commit
5503555c32
1 changed files with 2 additions and 0 deletions
  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;