From 1723eabb59cd6d3ecb9f3eafb2807acbd623cfca Mon Sep 17 00:00:00 2001 From: yangzhe Date: Fri, 31 Oct 2025 14:44:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=99=BB=E5=BD=95):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=98=BE=E7=A4=BA/=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login/index.vue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pages/login/login/index.vue b/pages/login/login/index.vue index 885388c..50c0771 100644 --- a/pages/login/login/index.vue +++ b/pages/login/login/index.vue @@ -69,12 +69,17 @@ + + + + {{ errors.password @@ -157,6 +162,7 @@ export default { data() { return { isTeacher: false, // 是否是教师 + isShowPassword: false, // 是否显示密码 // 登录参数 loginParams: { @@ -197,11 +203,17 @@ export default { this.clearErrors(); this.clearLoginParams(); this.loginType = type; + this.isShowPassword = false; if (this.loginType === "code") { this.refreshCaptcha(); } }, + // 切换显示密码 + toggleShowPassword() { + this.isShowPassword = !this.isShowPassword; + }, + // 刷新图形验证码 refreshCaptcha() { // 获取图形验证码 @@ -694,6 +706,18 @@ export default { height: 100%; } } + + .show-password-icon { + position: absolute; + right: 10rpx; + top: 50%; + transform: translateY(-50%); + height: 60rpx; + width: 60rpx; + display: flex; + align-items: center; + justify-content: center; + } } } }