1. 登录模块新增软key登录模块代码

develop
admin 2024-10-31 15:57:10 +08:00
parent 06c3761d05
commit 1a4f1b6734
1 changed files with 29 additions and 27 deletions

View File

@ -227,6 +227,7 @@ async function handleUkeyLogin() {
} }
}) })
} }
function checkCapslock({ shiftKey, key }: { shiftKey: boolean; key: string }) { function checkCapslock({ shiftKey, key }: { shiftKey: boolean; key: string }) {
if (key && key.length === 1) { if (key && key.length === 1) {
if ((shiftKey && key >= 'a' && key <= 'z') || (!shiftKey && key >= 'A' && key <= 'Z')) { if ((shiftKey && key >= 'a' && key <= 'z') || (!shiftKey && key >= 'A' && key <= 'Z')) {
@ -239,6 +240,7 @@ function checkCapslock({ shiftKey, key }: { shiftKey: boolean; key: string }) {
capsTooltip.value = false capsTooltip.value = false
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>