😎修复登录时大小写检测错误

This commit is contained in:
zuohuaijun 2024-07-26 12:51:05 +08:00
parent ee0f76223a
commit da5f9b1210
2 changed files with 4 additions and 2 deletions

View File

@ -59,7 +59,7 @@
"vform3-builds": "^3.0.10",
"vue": "^3.4.34",
"vue-clipboard3": "^2.0.0",
"vue-demi": "^0.14.9",
"vue-demi": "^0.14.10",
"vue-grid-layout": "3.0.0-beta1",
"vue-i18n": "^9.13.1",
"vue-json-pretty": "^2.4.0",

View File

@ -152,11 +152,13 @@ onMounted(async () => {
document.addEventListener('keyup', handleKeyPress);
});
//
onUnmounted(() => {
document.removeEventListener('keyup', handleKeyPress);
});
const handleKeyPress = (e: any) => {
//
const handleKeyPress = (e: KeyboardEvent) => {
const isCapsLockOn = e.getModifierState('CapsLock');
state.capsLockVisible = isCapsLockOn;
};