diff --git a/src/views/login/components/Login.vue b/src/views/login/components/Login.vue index 3da75575..a683566d 100644 --- a/src/views/login/components/Login.vue +++ b/src/views/login/components/Login.vue @@ -23,14 +23,19 @@ + @@ -132,6 +137,8 @@ const isCapsLock = ref(false); const captchaBase64 = ref(); // 记住我 const rememberMe = AuthStorage.getRememberMe(); +// 是否显示密码 +const showPasswordRef = ref(false); const loginFormData = ref({ username: "admin", @@ -217,6 +224,10 @@ function checkCapsLock(event: KeyboardEvent) { isCapsLock.value = event.getModifierState("CapsLock"); } } +// 切换密码显示 +function showPassword() { + showPasswordRef.value = !showPasswordRef.value; +} const emit = defineEmits(["update:modelValue"]); function toOtherForm(type: "register" | "resetPwd") {