登录页面 密码隐藏显示

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: {
@ -207,10 +209,12 @@ export default {
}, 3000);
},
showPwd() {
if (this.pwdType === 'password') {
if (this.pwdType === 'password') {
this.pwdDisplay=false;
this.pwdType = '';
} else {
this.pwdType = 'password';
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() {
@ -167,13 +169,13 @@ export default {
//
//
this.clearTimer(this.checkLogin);
this.clearTimer(this.checkLogin);
this.checkLogin = setTimeout(() => {
checkLoginStatus(self.sessionId).then(response => {
setDesignToken(response.data.token);
//
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKENDESIGN', value: response.data.token }).then(() => {
//
//
self.clearTimer(self.checkLogin);
self.$router.push({ path: '/design/login' });
self.$nextTick(() => {
@ -191,9 +193,11 @@ export default {
},
showPwd() {
if (this.pwdType === 'password') {
this.pwdDisplay=false;
this.pwdType = '';
} else {
this.pwdType = 'password';
this.pwdType = 'password';
this.pwdDisplay=true;
}
},
handleLogin() {