1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-07 18:25:45 +08:00

Merge d5d59949f24c4071815aac409d697c3c5e983d78 into 0caa975ee224074c77540107b1fe076081cdf306

This commit is contained in:
MaYuanhai 2022-04-11 18:42:22 +08:00 committed by GitHub
commit bf9e115ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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') {