登录页面 密码隐藏显示

This commit is contained in:
joylink_cuiweidong 2019-10-18 14:36:14 +08:00
parent d89b692b80
commit 3f82e45fcb
2 changed files with 17 additions and 9 deletions

View File

@ -49,7 +49,8 @@
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
<svg-icon icon-class="eye" v-if="pwdDisplay"/>
<svg-icon icon-class="eye-open" v-else/>
</span>
</el-form-item>
<div class="tip-message">{{ tipsMsg }}</div>
@ -130,7 +131,8 @@ export default {
loadingCode: false,
checkLogin: null,
checkTimeout: null,
scanSuccess: false
scanSuccess: false,
pwdDisplay:true
};
},
computed: {
@ -208,9 +210,11 @@ export default {
},
showPwd() {
if (this.pwdType === 'password') {
this.pwdDisplay=false;
this.pwdType = '';
} else {
this.pwdType = 'password';
this.pwdDisplay=true;
}
},
handleLogin() {

View File

@ -48,7 +48,8 @@
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
<svg-icon icon-class="eye" v-if="pwdDisplay"/>
<svg-icon icon-class="eye-open" v-else/>
</span>
</el-form-item>
<div class="tip-message">{{ tipsMsg }}</div>
@ -125,7 +126,8 @@ export default {
loadingCode: false,
checkLogin: null,
checkTimeout: null,
scanSuccess: false
scanSuccess: false,
pwdDisplay:true
};
},
mounted() {
@ -191,9 +193,11 @@ export default {
},
showPwd() {
if (this.pwdType === 'password') {
this.pwdDisplay=false;
this.pwdType = '';
} else {
this.pwdType = 'password';
this.pwdDisplay=true;
}
},
handleLogin() {