Commit af9fc322 authored by “yiyousong”'s avatar “yiyousong”

pref:修改登录校验和密码框

parent 146a4966
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item prop="password"> <a-form-model-item prop="password">
<a-input <a-input-password
type="password"
placeholder="请输入密码" placeholder="请输入密码"
onfocus="this.placeholder=''" onfocus="this.placeholder=''"
onblur="this.placeholder='请输入密码'" onblur="this.placeholder='请输入密码'"
...@@ -34,9 +33,22 @@ ...@@ -34,9 +33,22 @@
v-model="form.password" v-model="form.password"
@pressEnter="handleSubmit" @pressEnter="handleSubmit"
/> />
<!-- <a-input
type="password"
placeholder="请输入密码"
onfocus="this.placeholder=''"
onblur="this.placeholder='请输入密码'"
style="width: 520px; height: 52px"
class="password"
v-model="form.password"
@pressEnter="handleSubmit"
/> -->
</a-form-model-item> </a-form-model-item>
<a-form-model-item> <a-form-model-item>
<a-button type="primary" class="addclass backstage" @click="handleSubmit" <a-button
type="primary"
class="addclass backstage"
@click="handleSubmit"
>登录</a-button >登录</a-button
> >
</a-form-model-item> </a-form-model-item>
...@@ -49,7 +61,7 @@ ...@@ -49,7 +61,7 @@
<script> <script>
// import { mapMutations, mapActions } from "vuex"; // import { mapMutations, mapActions } from "vuex";
import { LoginInterface } from "@/api/user.js"; import { LoginInterface } from "@/api/user.js";
import { changeAccount, changePassWord } from "@/utils/js/validate"; // import { changeAccount, changePassWord } from "@/utils/js/validate";
export default { export default {
data() { data() {
return { return {
...@@ -58,12 +70,8 @@ export default { ...@@ -58,12 +70,8 @@ export default {
password: "", password: "",
}, },
rules: { rules: {
loginName: [ loginName: [{ required: true, message: "请输入账号", trigger: "blur" }],
{ required: true, validator: changeAccount, trigger: "blur" }, password: [{ required: true, message: "请输入密码", trigger: "blur" }],
],
password: [
{ required: true, validator: changePassWord, trigger: "blur" },
],
}, },
}; };
}, },
...@@ -124,12 +132,20 @@ export default { ...@@ -124,12 +132,20 @@ export default {
height: 220px; height: 220px;
padding-top: 30px; padding-top: 30px;
.user, .user,
.password { /deep/.password {
text-align: center; text-align: center;
border-color: #dadada; border-color: #dadada;
margin: auto; margin: auto;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 8px; margin-top: 8px;
.ant-input {
height: 100%;
&::placeholder {
color: rgb(111, 164, 227);
font-size: 16px;
}
border: 1px solid #dadada !important;
}
} }
/deep/.ant-col-offset-4 { /deep/.ant-col-offset-4 {
width: 100%; width: 100%;
......
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