完善登录注册

This commit is contained in:
jiayuqi7813
2022-06-01 20:12:03 +08:00
parent 601d9c2831
commit 3b6e304977
6 changed files with 257 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="login">
<div class="loin_form">
<div class="login_form">
<p>Welcome to SNCTF</p>
<el-tabs v-model="activeNames" >
<el-tab-pane label="登录" name="first">
@@ -13,7 +13,8 @@
type="text"
autocomplete="off"
v-model="loginForm.username"
prefix-icon="el-icon-user-solid"
prefix-icon="User"
placeholder="请输入用户名"
></el-input>
</el-form-item>
@@ -22,13 +23,13 @@
type="password"
autocomplete="off"
v-model="loginForm.password"
prefix-icon="el-icon-lock"
prefix-icon="Lock"
placeholder="请输入密码"
></el-input>
</el-form-item>
<el-form-item class="btns">
<el-button type="primary" @click="goToLogin">登录</el-button>
<!-- <el-button @click="resetLoginForm">重置</el-button>-->
<el-button @click="resetLoginForm">重置</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
@@ -88,7 +89,6 @@ export default {
message: '欢迎回来',
type: 'success',
duration: 3000,
});
}else{
ElNotification({
@@ -109,8 +109,44 @@ export default {
});
console.log(err)
})
},
resetLoginForm(){
this.$refs.loginForm.resetFields();
}
},
components: {Register}
}
</script>
</script>
<style scoped lang="less">
.login{
width:100%;
height:100vh;
overflow: auto;
position: relative;
.login_form {
width: 400px;
height: 400px;
position: absolute;
left: 78%;
top: 40%;
margin-left: -200px;
margin-top: -150px;
padding: 10px;
background: #fff;
border-radius: 10px;
box-shadow: 0 0 10px #ddd;
.btns {
display: flex;
justify-content: flex-end;
}
}
p {
font-size: 24px;
text-align: center;
font-weight: 600;
}
}
</style>