Merge pull request #60 from cshaptx4869/patch-31

fix(Login): 🐛 修复浏览器密码自动填充时可能存在的报错
This commit is contained in:
Ray Hao 2024-03-15 09:54:17 +08:00 committed by GitHub
commit 83ad943f14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -244,8 +244,11 @@ watchEffect(() => {
/** /**
* 检查输入大小写 * 检查输入大小写
*/ */
function checkCapslock(e: any) { function checkCapslock(event: KeyboardEvent) {
isCapslock.value = e.getModifierState("CapsLock"); //
if (event instanceof KeyboardEvent) {
isCapslock.value = event.getModifierState("CapsLock");
}
} }
onMounted(() => { onMounted(() => {