From 461caffb278080340176adf80d4fea404dd6be70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=93=E6=9C=88=E6=B8=85=E5=B2=9A?= <1518014096@qq.com> Date: Thu, 26 Dec 2024 22:51:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20keypress=E5=B7=B2=E5=BC=83=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E6=8E=A8=E8=8D=90=E5=86=8D=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E5=BB=BA=E8=AE=AE=E6=94=B9=E4=B8=BAkeydown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index a0bcaf3e4..d3f2361bc 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -96,7 +96,8 @@ const immediateDebounce: any = debounce( true ); -useEventListener(document, "keypress", ({ code }) => { +useEventListener(document, "keydown", ({ code }) => { + console.log(code); if ( ["Enter", "NumpadEnter"].includes(code) && !disabled.value &&