| | |
| | | <template> |
| | | <div class="login_container"> |
| | | <div class="login_box"> |
| | | <!-- 头像区域 --> |
| | | <div class="avatar_box"> |
| | | <img src="../assets/logo.jpg" alt="" /> |
| | | </div> |
| | | <!-- 登录表单区域 --> |
| | | <el-form ref="loginFormRef" :model="loginForm" label-width="0px" class="login_form"> |
| | | <!-- 用户名 --> |
| | | <el-form-item prop="username"> |
| | | <el-input v-model="loginForm.username" prefix-icon="iconfont icon-user" placeholder="请输入账号" clearable></el-input> |
| | | </el-form-item> |
| | | <!-- 密码 --> |
| | | <el-form-item prop="password"> |
| | | <el-input v-model="loginForm.password" prefix-icon="iconfont icon-3702mima" type="password" show-password placeholder="请输入密码"></el-input> |
| | | </el-form-item> |
| | | <!-- 按钮区域 --> |
| | | <el-form-item class="btns"> |
| | | <el-button type="primary" @click="Login">登录</el-button> |
| | | <el-button type="info" @click="resetLoginForm">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="login"> |
| | | <el-form class="login-form" :model="loginForm"> |
| | | <h3 class="title">新闻管理平台</h3> |
| | | <el-form-item> |
| | | <el-input v-model="loginForm.username" prefix-icon="el-icon-user-solid" type="text" placeholder="账号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="loginForm.password" show-password prefix-icon="el-icon-lock" type="password" placeholder="密码"></el-input> |
| | | </el-form-item> |
| | | <el-checkbox style="margin: 0px 0px 25px 0px">记住密码</el-checkbox> |
| | | <el-form-item> |
| | | <el-button @click="Login" size="medium" type="primary"> |
| | | <span>登录</span> |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="el-login-fotter"> |
| | | <span>Copyright © mingms.</span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .login_container { |
| | | background-color: #607eaa; |
| | | .login { |
| | | background-image: url('../assets/bg2.png'); |
| | | background-size: 100% 100%; |
| | | // background-size: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .login_box { |
| | | width: 450px; |
| | | height: 300px; |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .avatar_box { |
| | | height: 130px; |
| | | width: 130px; |
| | | border: 1px solid #eee; |
| | | border-radius: 50%; |
| | | padding: 10px; |
| | | box-shadow: 0 0 10px #ddd; |
| | | position: relative; |
| | | .login-form { |
| | | background-image: url('../assets/inputBg.png'); |
| | | border-radius: 6px; |
| | | position: absolute; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | background-color: #fff; |
| | | img { |
| | | width: 490px; |
| | | height: 444px; |
| | | right: 250px; |
| | | padding: 45px 50px 0 50px; |
| | | .title { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | font-size: 28px; |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 50%; |
| | | background-color: #eee; |
| | | font-family: PingFang SC; |
| | | color: #3360c2; |
| | | text-align: center; |
| | | margin-bottom: 35px; |
| | | } |
| | | .el-input { |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-button { |
| | | width: 100%; |
| | | margin: 35px 0; |
| | | background-color: #3360c2; |
| | | } |
| | | .el-button:hover { |
| | | background-color: #3360c2d5; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .login_form { |
| | | position: absolute; |
| | | bottom: 0; |
| | | width: 100%; |
| | | padding: 0 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .el-login-fotter { |
| | | position: fixed; |
| | | bottom: 0; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | font-family: Arial; |
| | | letter-spacing: 1px; |
| | | } |
| | | } |
| | | </style> |