diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 979cfcb4..b9cba35f 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -23,24 +23,28 @@
/>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
{{ $t('login.logIn') }}
@@ -107,6 +111,7 @@ export default {
password: [{ required: true, trigger: 'blur', validator: validatePassword }]
},
passwordType: 'password',
+ capsTooltip: false,
loading: false,
showDialog: false,
redirect: undefined
@@ -134,6 +139,18 @@ export default {
// window.removeEventListener('storage', this.afterQRScan)
},
methods: {
+ 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
+ }
+ }
+ if (key === 'CapsLock' && this.capsTooltip === true) {
+ this.capsTooltip = false
+ }
+ },
showPwd() {
if (this.passwordType === 'password') {
this.passwordType = ''