This commit is contained in:
南思 2023-07-07 16:28:25 +08:00
parent 5d2fd4741d
commit 1923dc7cab
1 changed files with 43 additions and 34 deletions

View File

@ -6,41 +6,34 @@
<div class="login_image"></div> <div class="login_image"></div>
<div class="auto"> <div class="auto">
<span class="auto_title"> 登录 </span> <span class="auto_title"> 登录 </span>
<el-form <el-form :model="data" size="medium" ref="formRef" @keyup.enter.native="handleSubmit">
:model="data"
size="medium"
ref="formRef"
@keyup.enter.native="handleSubmit"
>
<el-row :span="22"> <el-row :span="22">
<el-form-item prop="user"> <el-form-item prop="user">
<el-input <el-input v-model="data.user" style="width: 100%; margin-bottom: 20px" placeholder="帐号"
v-model="data.user" prefix-icon="User"></el-input>
style="width: 100%; margin-bottom: 20px"
placeholder="帐号"
prefix-icon="User"
></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row :span="22"> <el-row :span="22">
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input v-model="data.password" style="width: 100%; margin-bottom: 20px" type="password" placeholder="密码"
v-model="data.password" prefix-icon="Lock" show-password>
style="width: 100%; margin-bottom: 48px"
type="password"
placeholder="密码"
prefix-icon="Lock"
show-password
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-button <div style="display: flex; align-items: center;margin-bottom: 30px;">
class="login-btn-submit"
type="primary" <el-row :span="21">
@click="handleSubmit()" <el-form-item prop="password">
:loading="loading" <el-input v-model="data.password" style="width: 100%; margin-right: 20px;" type="password" placeholder="验证码"
> prefix-icon="Paperclip" >
</el-input>
</el-form-item>
</el-row>
<el-form-item prop="password">
<img src="@/assets/images/login_bg.png" class="codeStyle" @click="handleCode">
</el-form-item>
</div>
<el-button class="login-btn-submit" type="primary" @click="handleSubmit()" :loading="loading">
<span class="info1">&nbsp;</span> <span class="info1">&nbsp;</span>
</el-button> </el-button>
</el-form> </el-form>
@ -65,7 +58,10 @@ const data = reactive({
}); });
const loading = ref(false); const loading = ref(false);
const formRef = ref(); const formRef = ref();
const handleCode = () =>{
console.log('111111111');
}
const handleSubmit = async () => { const handleSubmit = async () => {
formRef.value.validate(async (valid) => { formRef.value.validate(async (valid) => {
if (valid) { if (valid) {
@ -103,10 +99,12 @@ const handleSubmit = async () => {
.auto { .auto {
.el-row { .el-row {
width: 100%; width: 100%;
.el-form-item { .el-form-item {
width: 100%; width: 100%;
} }
} }
.el-input__inner { .el-input__inner {
width: 100%; width: 100%;
height: 40px; height: 40px;
@ -118,10 +116,14 @@ const handleSubmit = async () => {
background-color: #fff; background-color: #fff;
box-shadow: none; box-shadow: none;
} }
.el-form-item__content { .el-form-item__content {
-webkit-user-select: none; /*谷歌 /Chrome*/ -webkit-user-select: none;
-moz-user-select: none; /*火狐/Firefox*/ /*谷歌 /Chrome*/
-ms-user-select: none; /*IE 10+*/ -moz-user-select: none;
/*火狐/Firefox*/
-ms-user-select: none;
/*IE 10+*/
user-select: none; user-select: none;
width: 100%; width: 100%;
} }
@ -133,7 +135,11 @@ const handleSubmit = async () => {
.main { .main {
height: 100vh; height: 100vh;
width: 100%; width: 100%;
.codeStyle{
width: 100px;
height: 44px;
cursor: pointer;
}
.login { .login {
position: relative; position: relative;
background: url(@/assets/images/login_bg_3.png); background: url(@/assets/images/login_bg_3.png);
@ -176,7 +182,6 @@ const handleSubmit = async () => {
.auto { .auto {
z-index: 4; z-index: 4;
height: 350px;
width: 436px; width: 436px;
position: absolute; position: absolute;
padding: 58px 32px; padding: 58px 32px;
@ -227,22 +232,26 @@ const handleSubmit = async () => {
top: 50%; top: 50%;
transform: translate(-50%, -60%); transform: translate(-50%, -60%);
} }
.main .auto { .main .auto {
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
z-index: 99; z-index: 99;
} }
.main .login { .main .login {
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
@media screen and (max-width: 662px) { @media screen and (max-width: 662px) {
.main .login .login_image { .main .login .login_image {
width: 100%; width: 100%;
transform: translate(-56%, -60%); transform: translate(-56%, -60%);
} }
} }
@media screen and (max-width: 420px) { @media screen and (max-width: 420px) {
.main .auto { .main .auto {
width: 100%; width: 100%;