From 5cc0b732c448190412b64d5235f8abf1c9546757 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 12 Jun 2023 16:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=85=E5=AE=B9=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatContent.vue | 5 ++++- src/components/chatInput.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/chatContent.vue b/src/components/chatContent.vue index c488f19..90770f9 100644 --- a/src/components/chatContent.vue +++ b/src/components/chatContent.vue @@ -4,7 +4,7 @@
- +
表情 @@ -56,6 +56,9 @@ export default { if (copyToClipboard(msg)) { this.$message.success("已复制") } + }, + optimizeMessage(msg = "") { + return msg.trim() } } } diff --git a/src/components/chatInput.vue b/src/components/chatInput.vue index 54a0d7f..ece7a85 100644 --- a/src/components/chatInput.vue +++ b/src/components/chatInput.vue @@ -25,7 +25,7 @@ export default { }, methods: { handleShortKey(e) { - if (e.ctrlKey && e.keyCode == 13) { + if (e.keyCode == 13) { this.$emit('update:modelValue', this.text) this.text = "" this.$emit('enter')