perf: 优化登录页 (#1168)

This commit is contained in:
sea 2024-06-27 09:55:47 +08:00 committed by GitHub
parent 13e7a13e9d
commit 775d7a2d32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,7 +97,11 @@ const immediateDebounce: any = debounce(
);
useEventListener(document, "keypress", ({ code }) => {
if (code === "Enter" && !disabled.value && !loading.value)
if (
["Enter", "NumpadEnter"].includes(code) &&
!disabled.value &&
!loading.value
)
immediateDebounce(ruleFormRef.value);
});