From a020be4e56d07ee7d3b5a46fa7065f8577346430 Mon Sep 17 00:00:00 2001 From: WkndNite Date: Mon, 4 Nov 2024 11:31:13 +0800 Subject: [PATCH 1/5] Compatibility adjustments for IE --- src/views/login/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 25906405944..ccd6dcb3e7c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -213,7 +213,12 @@ $cursor: #fff; color: $cursor; } } - +input[type="password"]::-ms-reveal { + display: none; /* 对于IE */ +} +input[type="password"]::-ms-clear { + display: none; /* 对于IE */ +} /* reset element-ui css */ .login-container { .el-input { From 9ca8a2a9b7a16c9d9b374cf73927341630a3c036 Mon Sep 17 00:00:00 2001 From: lmz2003 Date: Mon, 4 Nov 2024 21:31:59 +0800 Subject: [PATCH 2/5] support for Chrome Safari --- src/views/login/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ccd6dcb3e7c..86246f3ca9e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -219,6 +219,11 @@ input[type="password"]::-ms-reveal { input[type="password"]::-ms-clear { display: none; /* 对于IE */ } + +input[type="password"]::-webkit-inner-spin-button, +input[type="password"]::-webkit-calendar-picker-indicator { + display: none; /* 针对 Chrome 和 Safari */ +} /* reset element-ui css */ .login-container { .el-input { From c78606c6f7387f7eefc1059dd0c8808d27e77cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=B4=BA=E5=B2=90?= <3524469622@qq.com> Date: Mon, 4 Nov 2024 22:02:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=AD=A3=E5=88=99=E8=A1=A8=E8=BE=BE=E5=BC=8F=E6=9D=A5=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=AF=86=E7=A0=81=E6=98=AF=E5=90=A6=E8=87=B3=E5=B0=91?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E4=B8=80=E4=B8=AA=E5=A4=A7=E5=86=99=E5=AD=97?= =?UTF-8?q?=E6=AF=8D=E5=92=8C=E4=B8=80=E4=B8=AA=E5=B0=8F=E5=86=99=E5=AD=97?= =?UTF-8?q?=E6=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 86246f3ca9e..5640573fbba 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -88,13 +88,16 @@ export default { callback() } } + // 可以使用正则表达式来验证密码是否至少包含一个大写字母和一个小写字母 const validatePassword = (rule, value, callback) => { - if (value.length < 6) { - callback(new Error('The password can not be less than 6 digits')) - } else { - callback() - } + if (value.length < 6) { + callback(new Error('The password can not be less than 6 digits')); + } else if (!/[a-z]/.test(value) ||!/[A-Z]/.test(value)) { + callback(new Error('The password should contain both uppercase and lowercase letters')); + } else { + callback(); } + }; return { loginForm: { username: 'admin', From 9f0c46efc62c9469e209d46c6c184d9ee8daedb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=B4=BA=E5=B2=90?= <3524469622@qq.com> Date: Mon, 4 Nov 2024 22:16:09 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=92=88=E5=AF=B9=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A1=AB=E5=85=85=E4=B8=94=E7=84=A6=E7=82=B9=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 5640573fbba..36611fdf01d 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -212,7 +212,7 @@ $light_gray:#fff; $cursor: #fff; @supports (-webkit-mask: none) and (not (cater-color: $cursor)) { - .login-container .el-input input { + .login-container.el-input input { color: $cursor; } } @@ -222,10 +222,19 @@ input[type="password"]::-ms-reveal { input[type="password"]::-ms-clear { display: none; /* 对于IE */ } - input[type="password"]::-webkit-inner-spin-button, input[type="password"]::-webkit-calendar-picker-indicator { - display: none; /* 针对 Chrome 和 Safari */ + display: none; /* 针对Chrome和Safari */ +} +input:-webkit-autofill { + box-shadow: 0 0 0px 1000px $bg inset!important; + -webkit-text-fill-color: $cursor!important; +} +// 新增以下样式,针对自动填充且焦点状态下的样式优化 +input:-webkit-autofill:focus { + box-shadow: 0 0 0px 1000px $bg inset!important; + -webkit-text-fill-color: $cursor!important; + border: 1px solid rgba(255, 255, 255, 0.1)!important; } /* reset element-ui css */ .login-container { From ade35786b4f13b9e525920f8c926643cc091c460 Mon Sep 17 00:00:00 2001 From: asdfo123 Date: Mon, 4 Nov 2024 22:27:00 +0800 Subject: [PATCH 5/5] add loading prompt --- src/views/login/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 36611fdf01d..e7b56c00ce0 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -45,7 +45,10 @@ - Login + + Login + Logging in... +