1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +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) // window.removeEventListener('storage', this.afterQRScan)
}, },
methods: { methods: {
checkCapslock(e) { checkCapslock({ shiftKey, key }) {
const { key } = e if (key && key.length === 1) {
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z') 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() { showPwd() {
if (this.passwordType === 'password') { if (this.passwordType === 'password') {