Commit 105c0cf6 authored by 杨梦雪's avatar 杨梦雪

11

parent bd44fa07
<template> <template>
<div class="container"> <div class="container">
<div class="flex title_Login"> <div class="flex title_Login">
<div @click="toLogin"> <div class="title" style="width: 30%" @click="toCodeLogin">
<div class="title">账号密码登录</div> <div :class="changeLogin == 2 ? 'change_login' : ''">验证码登录</div>
<div class="line"></div>
</div> </div>
<div class="codeLogin" @click="toCodeLogin"> <div class="title" style="width: 35%" @click="toLogin">
<div class="title">验证码登录</div> <div :class="changeLogin == 1 ? 'change_codelogin' : ''">
<div class="line"></div> 账号密码登录
</div> </div>
</div> </div>
</div>
<div> <div>
<el-form <el-form
:model="loginForm" :model="loginForm"
...@@ -173,7 +174,7 @@ export default { ...@@ -173,7 +174,7 @@ export default {
{ min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur" }, { min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur" },
], ],
}, },
changeLogin: 1, changeLogin: 2,
}; };
}, },
created() { created() {
...@@ -259,7 +260,6 @@ export default { ...@@ -259,7 +260,6 @@ export default {
// 登录 // 登录
submitForm() { submitForm() {
this.$refs["loginFormRef"].validate((valid) => { this.$refs["loginFormRef"].validate((valid) => {
if (!valid) return; if (!valid) return;
let obj = {}; let obj = {};
if (this.changeLogin == 1) { if (this.changeLogin == 1) {
...@@ -311,28 +311,25 @@ export default { ...@@ -311,28 +311,25 @@ export default {
overflow: hidden; overflow: hidden;
.title_Login { .title_Login {
justify-content: space-between; justify-content: space-between;
margin: 19px 0 0 0;
.title { .title {
margin: 19px 0 6px 0;
width: 132px;
height: 20px; height: 20px;
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: 500;
color: var(--color); color: var(--color);
line-height: 20px; line-height: 20px;
} }
.line { .change_login {
width: 125px; width: 100%;
height: 3px; font-size: 19px;
background: var(--color); margin-top: 8px;
border-radius: 2px; border-bottom: 2px solid var(--color);
}
.codeLogin {
.title {
font-size: 18px !important;
}
.line {
width: 100px;
} }
.change_codelogin {
width: 100%;
font-size: 17px;
margin-top: 8px;
border-bottom: 2px solid var(--color);
} }
} }
......
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