revert: ⏪ 回滚自行实现显示密码功能
This commit is contained in:
@@ -23,19 +23,14 @@
|
||||
<el-input
|
||||
v-model.trim="loginFormData.password"
|
||||
:placeholder="t('login.password')"
|
||||
:type="showPasswordRef ? 'text' : 'password'"
|
||||
type="password"
|
||||
show-password
|
||||
@keyup="checkCapsLock"
|
||||
@keyup.enter="handleLoginSubmit"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon><Lock /></el-icon>
|
||||
</template>
|
||||
<template #suffix>
|
||||
<el-icon v-if="!showPasswordRef" cursor-pointer @click="showPassword">
|
||||
<View />
|
||||
</el-icon>
|
||||
<el-icon v-else cursor-pointer @click="showPassword"><Hide /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
@@ -137,8 +132,6 @@ const isCapsLock = ref(false);
|
||||
const captchaBase64 = ref();
|
||||
// 记住我
|
||||
const rememberMe = AuthStorage.getRememberMe();
|
||||
// 是否显示密码
|
||||
const showPasswordRef = ref(false);
|
||||
|
||||
const loginFormData = ref<LoginFormData>({
|
||||
username: "admin",
|
||||
@@ -224,10 +217,6 @@ 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") {
|
||||
|
||||
Reference in New Issue
Block a user