Commit ac40f051 by 高浩杰

fix iissue#2

parent b884f044
......@@ -86,7 +86,8 @@ export default {
// 控制密码 显隐
handleShow() {
this.iconName = this.iconName === 'visible' ? 'invisible' : 'visible';
this.type = this.type === 'password' ? 'text' : 'password';
// this.type = this.type === 'password' ? 'text' : 'password';
this.$emit('handleShowPassword')
},
// 短信倒计时
handleCountdown() {
......
......@@ -117,12 +117,13 @@
:error-message="newPasswordMsg"
placeholder="请输入新的密码"
input-type="2"
type="password"
:type="type"
autocomplete="new-password"
v-model="newPassword"
@handleCheck="handleCheckPassword"
@cancelCheck="newPasswordMsg = ''"
@keyup.enter.native="savePassword"
@handleShowPassword="handleShowPassword"
></login-input>
</div>
<div :title="titleMsg">
......@@ -206,6 +207,7 @@
},
data() {
return {
type: 'password', // 显示密码
isShow: false,
title: '绑定手机号',
verifyCode: '',
......@@ -223,6 +225,11 @@
}
},
methods: {
// 控制密码显示
handleShowPassword() {
this.type = this.type === 'password' ? 'text' : 'password';
},
// 点击打开弹窗执行
handleChange(type) {
Object.assign(this.$data, this.$options.data());
this.isShow = true;
......
......@@ -28,12 +28,13 @@
:error-message="passwordErrMsg"
placeholder="请输入密码"
input-type="2"
type="password"
:type="type"
v-model="password"
v-if="isPassword"
@handleCheck="checkPassword"
@cancelCheck="passwordErrMsg = ''"
@keyup.enter.native="handleLogin"
@handleShowPassword="handleShowPassword"
></login-input>
<login-input
:error-message="verifyErrMsg"
......@@ -76,6 +77,7 @@ export default {
},
data() {
return {
type: 'password', // 显示密码
account: '', // 保存 手机号 邮箱
password: '', // 保存 密码
verifyCode: '', // 保存 验证码
......@@ -100,6 +102,10 @@ export default {
this.isPassword = false;
this.placeholder = '请输入手机号';
},
// 控制密码显示
handleShowPassword() {
this.type = this.type === 'password' ? 'text' : 'password';
},
// 跳转注册页面
handleRegister() {
this.$router.push('/users/register');
......
......@@ -21,11 +21,12 @@
:error-message="passwordErrMsg"
placeholder="请输入密码"
input-type="2"
type="password"
:type="type"
v-model="password"
@handleCheck="checkPassword"
@cancelCheck="passwordErrMsg = ''"
@keyup.enter.native="handleRegisterEnter"
@handleShowPassword="handleShowPassword"
></login-input>
<login-input
:error-message="verifyErrMsg"
......@@ -71,6 +72,7 @@ export default {
},
data(){
return {
type: 'password', // 显示密码
success: false,
account: '', // 保存 手机号 邮箱
password: '', // 保存 密码
......@@ -108,6 +110,10 @@ export default {
this.isEmail = true;
this.placeholder = '请输入邮箱账号';
},
// 控制密码显示
handleShowPassword() {
this.type = this.type === 'password' ? 'text' : 'password';
},
// 检测account 手机 邮箱
checkAccount() {
if (this.isEmail) {
......
......@@ -18,11 +18,12 @@
:error-message="passwordErrMsg"
placeholder="请输入新的密码"
input-type="2"
type="password"
:type="type"
v-model="password"
@handleCheck="checkPassword"
@cancelCheck="passwordErrMsg = ''"
@keyup.enter.native="handleReset"
@handleShowPassword="handleShowPassword"
></login-input>
<login-input
:error-message="verifyErrMsg"
......@@ -63,6 +64,7 @@ export default {
},
data() {
return {
type: 'password', // 显示密码
account: '', // 保存 手机号 邮箱
password: '', // 保存 密码
verifyCode: '', // 保存 验证码
......@@ -87,6 +89,10 @@ export default {
}
},
methods: {
// 控制密码显示
handleShowPassword() {
this.type = this.type === 'password' ? 'text' : 'password';
},
// 检测account 手机
checkAccount() {
this.accountErrMsg = checkPhone(this.account);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment