update login

qianlishi 3 years ago
parent 1107013ce5
commit daf84449eb

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

Loading…
Cancel
Save