From ce7eaf97c37e476849c002ed8c720b4615965cda Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期二, 11 十月 2022 12:01:21 +0800
Subject: [PATCH] 更新login
---
src/assets/bg2.png | 0
public/index.html | 23 ++++++-
src/assets/preview/login.jpg | 0
src/assets/inputBg.png | 0
src/components/Login.vue | 125 ++++++++++++++++++++---------------------
5 files changed, 81 insertions(+), 67 deletions(-)
diff --git a/public/index.html b/public/index.html
index 9df6878..a6a26d2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>鏂伴椈涓庝紶鎾闄㈢綉绔�</title>
</head>
<body>
@@ -14,4 +14,19 @@
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
+ <style>
+ * {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ body {
+ margin: 0;
+ }
+ html,
+ body {
+ width: 100%;
+ height: 100%;
+ }
+ </style>
</html>
diff --git a/src/assets/bg2.png b/src/assets/bg2.png
new file mode 100644
index 0000000..1fbdc8c
--- /dev/null
+++ b/src/assets/bg2.png
Binary files differ
diff --git a/src/assets/inputBg.png b/src/assets/inputBg.png
new file mode 100644
index 0000000..3ecff83
--- /dev/null
+++ b/src/assets/inputBg.png
Binary files differ
diff --git a/src/assets/preview/login.jpg b/src/assets/preview/login.jpg
index dde8b55..3a88555 100644
--- a/src/assets/preview/login.jpg
+++ b/src/assets/preview/login.jpg
Binary files differ
diff --git a/src/components/Login.vue b/src/components/Login.vue
index 5508b0d..4a084ae 100644
--- a/src/components/Login.vue
+++ b/src/components/Login.vue
@@ -1,26 +1,22 @@
<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>
@@ -67,51 +63,54 @@
</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>
--
Gitblit v1.8.0