This commit is contained in:
MaYuanhai
2020-12-05 03:55:52 -08:00
committed by GitHub

View File

@@ -138,9 +138,15 @@ export default {
// window.removeEventListener('storage', this.afterQRScan)
},
methods: {
checkCapslock(e) {
const { key } = e
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z')
checkCapslock({ shiftKey, key }) {
if (key && key.length === 1) {
if (shiftKey && (key >= 'a' && key <= 'z') || !shiftKey && (key >= 'A' && key <= 'Z')) {
this.capsTooltip = true
} else {
this.capsTooltip = false
}
}
key === 'CapsLock' && this.capsTooltip === true && (this.capsTooltip = false)
},
showPwd() {
if (this.passwordType === 'password') {