From c2f5443eaf409bb3873e16fa69a2ec102d92aee9 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Wed, 28 Jan 2026 15:34:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E6=AD=A2=E5=8F=91=E9=80=81?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E6=88=96=E7=BA=AF=E7=A9=BA=E6=A0=BC=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在聊天页面和首页发送消息前,增加对消息内容的修剪检查,避免发送仅包含空格的无效消息。 --- pages/chat/index.vue | 2 +- pages/home/index/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/chat/index.vue b/pages/chat/index.vue index a72d774..7278db6 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -287,7 +287,7 @@ export default { // 点击发送 handleSend() { - if (!this.messageValue) { + if (!this.messageValue || !this.messageValue.trim()) { return; } diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index e62da6b..32a43bc 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -855,7 +855,7 @@ export default { // 修改发送消息的方法 sendMessageFn() { - if (!this.messageValue) { + if (!this.messageValue || !this.messageValue.trim()) { return; }