😎修复登录时大小写检测错误
This commit is contained in:
parent
ee0f76223a
commit
da5f9b1210
@ -59,7 +59,7 @@
|
|||||||
"vform3-builds": "^3.0.10",
|
"vform3-builds": "^3.0.10",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.34",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-demi": "^0.14.9",
|
"vue-demi": "^0.14.10",
|
||||||
"vue-grid-layout": "3.0.0-beta1",
|
"vue-grid-layout": "3.0.0-beta1",
|
||||||
"vue-i18n": "^9.13.1",
|
"vue-i18n": "^9.13.1",
|
||||||
"vue-json-pretty": "^2.4.0",
|
"vue-json-pretty": "^2.4.0",
|
||||||
|
|||||||
@ -152,11 +152,13 @@ onMounted(async () => {
|
|||||||
document.addEventListener('keyup', handleKeyPress);
|
document.addEventListener('keyup', handleKeyPress);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 页面初始化
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener('keyup', handleKeyPress);
|
document.removeEventListener('keyup', handleKeyPress);
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleKeyPress = (e: any) => {
|
// 检测大小写按键
|
||||||
|
const handleKeyPress = (e: KeyboardEvent) => {
|
||||||
const isCapsLockOn = e.getModifierState('CapsLock');
|
const isCapsLockOn = e.getModifierState('CapsLock');
|
||||||
state.capsLockVisible = isCapsLockOn;
|
state.capsLockVisible = isCapsLockOn;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user