update login

qianlishi 3 years ago
parent 1107013ce5
commit daf84449eb

@ -124,22 +124,22 @@ export default {
},
data() {
return {
activeTop: "-50%", //
rememberPsw: false, //
activeTop: "-50%",
rememberPsw: false,
loginForm: {
loginName: "",
password: "",
verifyCode: ""
}, //
},
loginRules: {
loginName: [{ required: true, message: "用户名必填", trigger: "blur" }],
password: [{ required: true, message: "用户密码必填", trigger: "blur" }]
}, //
passwordType: "password", //
capsTooltip: false, //
loading: false, // loding
redirect: undefined, //
otherQuery: {}, //
},
passwordType: "password",
capsTooltip: false,
loading: false,
redirect: undefined,
otherQuery: {},
needCaptcha: false
};
},
@ -157,14 +157,16 @@ export default {
}
},
mounted() {
//
if (this.loginForm.loginName === "") {
this.$refs.loginName.focus();
} else if (this.loginForm.password === "") {
this.$refs.password.focus();
}
this.handleLoginFocus();
},
methods: {
handleLoginFocus() {
if (this.loginForm.loginName === "") {
this.$refs.loginName.focus();
} else if (this.loginForm.password === "") {
this.$refs.password.focus();
}
},
//
getPsw() {
const cookVal = cookies.get(`u_${this.loginForm.loginName}`);
@ -269,7 +271,6 @@ export default {
background: #fff;
}
/* reset element-ui css */
.login_container {
.el-input {
display: inline-block;
@ -321,7 +322,6 @@ export default {
position: relative;
width: 100%;
height: calc(100% - 60px);
// height: 100%;
.login_img {
display: block;
width: 100%;
@ -420,7 +420,6 @@ export default {
p {
padding-left: 8px;
}
// justify-content: space-between;
& > input {
position: relative;
width: 14px;

Loading…
Cancel
Save