From 63af4a8e97dfefa6f3fcee2bf8344d0169dff322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=83=E4=BA=AE=E6=96=8C?= <1129525450@qq.com> Date: Sat, 11 Feb 2023 23:51:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E6=AD=A2=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E8=BE=93=E5=85=A5=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E6=97=B6=E8=A7=A6=E5=8F=91=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分输入法支持中英文混输,输入过程中按空格选择中文,按回车把当前的英文直接上屏。 至少在Chrome浏览器中,会把输入法选英文词的回车作为keyup事件,导致未输入完成的句子被提交。改成监听keypress事件就没问题了。 其他浏览器未测试。 --- src/views/Chat/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Chat/index.vue b/src/views/Chat/index.vue index 75dd1dc..03e9a55 100644 --- a/src/views/Chat/index.vue +++ b/src/views/Chat/index.vue @@ -104,7 +104,7 @@ function addMessage(message: string, reversal = false) {