fix(Login): 🐛 修复浏览器密码自动填充时可能存在的报错

This commit is contained in:
cshaptx4869 2024-03-15 09:50:29 +08:00
parent 4825d60d3c
commit 62300347bb
1 changed files with 5 additions and 2 deletions

View File

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