fix: 防止发送空白或纯空格消息

在聊天页面和首页发送消息前,增加对消息内容的修剪检查,避免发送仅包含空格的无效消息。
This commit is contained in:
yangzhe 2026-01-28 15:34:12 +08:00
parent ab4ca595b3
commit c2f5443eaf
2 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ export default {
//
handleSend() {
if (!this.messageValue) {
if (!this.messageValue || !this.messageValue.trim()) {
return;
}

View File

@ -855,7 +855,7 @@ export default {
//
sendMessageFn() {
if (!this.messageValue) {
if (!this.messageValue || !this.messageValue.trim()) {
return;
}