Pan %!s(int64=6) %!d(string=hai) anos
pai
achega
3c75eb6dde
Modificáronse 5 ficheiros con 88 adicións e 80 borrados
  1. 2 1
      .postcssrc.js
  2. 1 1
      src/App.vue
  3. 9 10
      src/components/Hamburger/index.vue
  4. 1 1
      src/main.js
  5. 75 67
      src/views/login/index.vue

+ 2 - 1
.postcssrc.js

@@ -2,8 +2,9 @@
2 2
 
3 3
 module.exports = {
4 4
   "plugins": {
5
-    // to edit target browsers: use "browserslist" field in package.json
6 5
     "postcss-import": {},
6
+    "postcss-url": {},
7
+    // to edit target browsers: use "browserslist" field in package.json
7 8
     "autoprefixer": {}
8 9
   }
9 10
 }

+ 1 - 1
src/App.vue

@@ -6,6 +6,6 @@
6 6
 
7 7
 <script>
8 8
 export default {
9
-  name: 'app'
9
+  name: 'App'
10 10
 }
11 11
 </script>

+ 9 - 10
src/components/Hamburger/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div>
3
-    <svg t="1492500959545" @click="toggleClick" class="svg-icon hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024"
3
+    <svg t="1492500959545" @click="toggleClick" class="hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024"
4 4
       version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1691" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
5 5
       <path d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
6 6
         p-id="1692"></path>
@@ -30,16 +30,15 @@ export default {
30 30
 
31 31
 <style scoped>
32 32
 .hamburger {
33
-    display: inline-block;
34
-    cursor: pointer;
35
-    width: 20px;
36
-    height: 20px;
37
-    transform: rotate(0deg);
38
-    transition: .38s;
39
-    transform-origin: 50% 50%;
33
+	display: inline-block;
34
+	cursor: pointer;
35
+	width: 20px;
36
+	height: 20px;
37
+	transform: rotate(90deg);
38
+	transition: .38s;
39
+	transform-origin: 50% 50%;
40 40
 }
41
-
42 41
 .hamburger.is-active {
43
-    transform: rotate(90deg);
42
+	transform: rotate(0deg);
44 43
 }
45 44
 </style>

+ 1 - 1
src/main.js

@@ -4,7 +4,7 @@ import 'normalize.css/normalize.css'// A modern alternative to CSS resets
4 4
 
5 5
 import ElementUI from 'element-ui'
6 6
 import 'element-ui/lib/theme-chalk/index.css'
7
-import locale from 'element-ui/lib/locale/lang/en'
7
+import locale from 'element-ui/lib/locale/lang/en' // lang i18n
8 8
 
9 9
 import '@/styles/index.scss' // global css
10 10
 

+ 75 - 67
src/views/login/index.vue

@@ -1,7 +1,6 @@
1 1
 <template>
2 2
   <div class="login-container">
3
-    <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
4
-      class="card-box login-form">
3
+    <el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left">
5 4
       <h3 class="title">vue-element-admin</h3>
6 5
       <el-form-item prop="username">
7 6
         <span class="svg-container svg-container_login">
@@ -92,19 +91,15 @@ export default {
92 91
 </script>
93 92
 
94 93
 <style rel="stylesheet/scss" lang="scss">
95
-  $bg:#2d3a4b;
96
-  $dark_gray:#889aa4;
97
-  $light_gray:#eee;
94
+$bg:#2d3a4b;
95
+$light_gray:#eee;
98 96
 
99
-  .login-container {
100
-    position: fixed;
101
-    height: 100%;
102
-    width:100%;
103
-    background-color: $bg;
104
-    input:-webkit-autofill {
105
-      -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
106
-      -webkit-text-fill-color: #fff !important;
107
-    }
97
+/* reset element-ui css */
98
+.login-container {
99
+  .el-input {
100
+    display: inline-block;
101
+    height: 47px;
102
+    width: 85%;
108 103
     input {
109 104
       background: transparent;
110 105
       border: 0px;
@@ -113,62 +108,75 @@ export default {
113 108
       padding: 12px 5px 12px 15px;
114 109
       color: $light_gray;
115 110
       height: 47px;
116
-    }
117
-    .el-input {
118
-      display: inline-block;
119
-      height: 47px;
120
-      width: 85%;
121
-    }
122
-    .tips {
123
-      font-size: 14px;
124
-      color: #fff;
125
-      margin-bottom: 10px;
126
-    }
127
-    .svg-container {
128
-      padding: 6px 5px 6px 15px;
129
-      color: $dark_gray;
130
-      vertical-align: middle;
131
-      width: 30px;
132
-      display: inline-block;
133
-      &_login {
134
-        font-size: 20px;
111
+      &:-webkit-autofill {
112
+        -webkit-box-shadow: 0 0 0px 1000px $bg inset !important;
113
+        -webkit-text-fill-color: #fff !important;
135 114
       }
136 115
     }
137
-    .title {
138
-      font-size: 26px;
139
-      font-weight: 400;
140
-      color: $light_gray;
141
-      margin: 0px auto 40px auto;
142
-      text-align: center;
143
-      font-weight: bold;
144
-    }
145
-    .login-form {
146
-      position: absolute;
147
-      left: 0;
148
-      right: 0;
149
-      width: 400px;
150
-      padding: 35px 35px 15px 35px;
151
-      margin: 120px auto;
152
-    }
153
-    .el-form-item {
154
-      border: 1px solid rgba(255, 255, 255, 0.1);
155
-      background: rgba(0, 0, 0, 0.1);
156
-      border-radius: 5px;
157
-      color: #454545;
158
-    }
159
-    .show-pwd {
160
-      position: absolute;
161
-      right: 10px;
162
-      top: 7px;
163
-      font-size: 16px;
164
-      color: $dark_gray;
165
-      cursor: pointer;
166
-      user-select:none;
116
+  }
117
+  .el-form-item {
118
+    border: 1px solid rgba(255, 255, 255, 0.1);
119
+    background: rgba(0, 0, 0, 0.1);
120
+    border-radius: 5px;
121
+    color: #454545;
122
+  }
123
+}
124
+
125
+</style>
126
+
127
+<style rel="stylesheet/scss" lang="scss" scoped>
128
+$bg:#2d3a4b;
129
+$dark_gray:#889aa4;
130
+$light_gray:#eee;
131
+.login-container {
132
+  position: fixed;
133
+  height: 100%;
134
+  width: 100%;
135
+  background-color: $bg;
136
+  .login-form {
137
+    position: absolute;
138
+    left: 0;
139
+    right: 0;
140
+    width: 520px;
141
+    padding: 35px 35px 15px 35px;
142
+    margin: 120px auto;
143
+  }
144
+  .tips {
145
+    font-size: 14px;
146
+    color: #fff;
147
+    margin-bottom: 10px;
148
+    span {
149
+      &:first-of-type {
150
+        margin-right: 16px;
151
+      }
167 152
     }
168
-    .thirdparty-button{
169
-      position: absolute;
170
-      right: 35px;
171
-      bottom: 28px;
153
+  }
154
+  .svg-container {
155
+    padding: 6px 5px 6px 15px;
156
+    color: $dark_gray;
157
+    vertical-align: middle;
158
+    width: 30px;
159
+    display: inline-block;
160
+    &_login {
161
+      font-size: 20px;
172 162
     }
173 163
   }
164
+  .title {
165
+    font-size: 26px;
166
+    font-weight: 400;
167
+    color: $light_gray;
168
+    margin: 0px auto 40px auto;
169
+    text-align: center;
170
+    font-weight: bold;
171
+  }
172
+  .show-pwd {
173
+    position: absolute;
174
+    right: 10px;
175
+    top: 7px;
176
+    font-size: 16px;
177
+    color: $dark_gray;
178
+    cursor: pointer;
179
+    user-select: none;
180
+  }
181
+}
174 182
 </style>