登录页面 密码隐藏显示
This commit is contained in:
parent
d89b692b80
commit
3f82e45fcb
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user