Pan 7 years ago
parent
commit
c51c7fec5f

File diff suppressed because it is too large
+ 23 - 13
src/components/Hamburger/index.vue


+ 9 - 7
src/router/index.js

@@ -1,8 +1,7 @@
1 1
 import Vue from 'vue';
2 2
 import Router from 'vue-router';
3 3
 const _import = require('./_import_' + process.env.NODE_ENV);
4
-// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow
5
-// so only in production use Lazy Loading
4
+// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow.so only in production use Lazy Loading
6 5
 
7 6
 /* layout */
8 7
 import Layout from '../views/layout/Layout';
@@ -16,6 +15,7 @@ const dashboard = _import('dashboard/index');
16 15
 /* error page */
17 16
 const Err404 = _import('404');
18 17
 
18
+/* demo page */
19 19
 const Form = _import('page/form');
20 20
 const Table = _import('table/index');
21 21
 
@@ -23,10 +23,10 @@ Vue.use(Router);
23 23
 
24 24
  /**
25 25
   * icon : the icon show in the sidebar
26
-  * hidden : if hidden:true will not show in the sidebar
27
-  * redirect : if redirect:noredirect will not redirct in the levelbar
28
-  * noDropdown : if noDropdown:true will not has submenu
29
-  * meta : { role: ['admin'] }  will control the page role
26
+  * hidden : if `hidden:true` will not show in the sidebar
27
+  * redirect : if `redirect:noredirect` will not redirct in the levelbar
28
+  * noDropdown : if `noDropdown:true` will not has submenu in the sidebar
29
+  * meta : `{ role: ['admin'] }`  will control the page role
30 30
   **/
31 31
 export const constantRouterMap = [
32 32
   { path: '/login', component: Login, hidden: true },
@@ -35,7 +35,7 @@ export const constantRouterMap = [
35 35
     path: '/',
36 36
     component: Layout,
37 37
     redirect: '/dashboard',
38
-    name: '首页',
38
+    name: 'Home',
39 39
     hidden: true,
40 40
     children: [{ path: 'dashboard', component: dashboard }]
41 41
   }
@@ -58,6 +58,7 @@ export const asyncRouterMap = [
58 58
       { path: 'index', component: Form, name: 'Form', icon: 'zonghe' }
59 59
     ]
60 60
   },
61
+
61 62
   {
62 63
     path: '/table',
63 64
     component: Layout,
@@ -67,5 +68,6 @@ export const asyncRouterMap = [
67 68
     noDropdown: true,
68 69
     children: [{ path: 'index', component: Table, name: 'Table', meta: { role: ['admin'] } }]
69 70
   },
71
+
70 72
   { path: '*', redirect: '/404', hidden: true }
71 73
 ];

+ 0 - 25
src/store/modules/user.js

@@ -56,21 +56,6 @@ const user = {
56 56
       });
57 57
     },
58 58
 
59
-    // 第三方验证登录
60
-    LoginByThirdparty({ commit, state }, code) {
61
-      return new Promise((resolve, reject) => {
62
-        commit('SET_CODE', code);
63
-        loginByThirdparty(state.status, state.email, state.code, state.auth_type).then(response => {
64
-          commit('SET_TOKEN', response.data.token);
65
-          Cookies.set('Admin-Token', response.data.token);
66
-          resolve();
67
-        }).catch(error => {
68
-          reject(error);
69
-        });
70
-      });
71
-    },
72
-
73
-
74 59
     // 登出
75 60
     LogOut({ commit, state }) {
76 61
       return new Promise((resolve, reject) => {
@@ -92,16 +77,6 @@ const user = {
92 77
         Cookies.remove('Admin-Token');
93 78
         resolve();
94 79
       });
95
-    },
96
-
97
-    // 动态修改权限
98
-    ChangeRole({ commit }, role) {
99
-      return new Promise(resolve => {
100
-        commit('SET_ROLES', [role]);
101
-        commit('SET_TOKEN', role);
102
-        Cookies.set('Admin-Token', role);
103
-        resolve();
104
-      })
105 80
     }
106 81
   }
107 82
 };

+ 4 - 5
src/utils/fetch.js

@@ -1,7 +1,7 @@
1 1
 import axios from 'axios';
2 2
 import { Message } from 'element-ui';
3 3
 import store from '../store';
4
-// import router from '../router';
4
+
5 5
 
6 6
 // 创建axios实例
7 7
 const service = axios.create({
@@ -11,9 +11,8 @@ const service = axios.create({
11 11
 
12 12
 // request拦截器
13 13
 service.interceptors.request.use(config => {
14
-  // Do something before request is sent
15 14
   if (store.getters.token) {
16
-    config.headers['X-Token'] = store.getters.token; // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改
15
+    config.headers['X-Token'] = store.getters.token; // 让每个请求携带自定义token 请根据实际情况自行修改
17 16
   }
18 17
   return config;
19 18
 }, error => {
@@ -26,8 +25,7 @@ service.interceptors.request.use(config => {
26 25
 service.interceptors.response.use(
27 26
   response => {
28 27
   /**
29
-  * 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
30
-  * 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
28
+  * code为非20000是抛错 可结合自己业务进行修改
31 29
   */
32 30
     const res = response.data;
33 31
     if (res.code !== 20000) {
@@ -36,6 +34,7 @@ service.interceptors.response.use(
36 34
         type: 'error',
37 35
         duration: 5 * 1000
38 36
       });
37
+
39 38
       // 50008:非法的token; 50012:其他客户端登录了;  50014:Token 过期了;
40 39
       if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
41 40
         MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', {

+ 0 - 12
src/utils/index.js

@@ -56,15 +56,3 @@
56 56
      return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
57 57
    }
58 58
  }
59
-
60
- export function scrollTo(element, to, duration) {
61
-   if (duration <= 0) return;
62
-   const difference = to - element.scrollTop;
63
-   const perTick = difference / duration * 10;
64
-   setTimeout(() => {
65
-     console.log(new Date())
66
-     element.scrollTop = element.scrollTop + perTick;
67
-     if (element.scrollTop === to) return;
68
-     scrollTo(element, to, duration - 10);
69
-   }, 10);
70
- }

+ 162 - 161
src/views/404.vue

@@ -38,191 +38,192 @@
38 38
 </script>
39 39
 
40 40
 <style rel="stylesheet/scss" lang="scss" scoped>
41
-  .wscn-http404 {
41
+.wscn-http404 {
42
+  position: relative;
43
+  width: 1200px;
44
+  margin: 20px auto 60px;
45
+  padding: 0 100px;
46
+  overflow: hidden;
47
+  .pic-404 {
42 48
     position: relative;
43
-    width: 1200px;
44
-    margin: 20px auto 60px;
45
-    padding: 0 100px;
49
+    float: left;
50
+    width: 600px;
51
+    padding: 150px 0;
46 52
     overflow: hidden;
47
-    .pic-404 {
48
-      position: relative;
49
-      float: left;
50
-      width: 600px;
51
-      padding: 150px 0;
52
-      overflow: hidden;
53
-      &__parent {
54
-        width: 100%;
53
+    &__parent {
54
+      width: 100%;
55
+    }
56
+    &__child {
57
+      position: absolute;
58
+      &.left {
59
+        width: 80px;
60
+        top: 17px;
61
+        left: 220px;
62
+        opacity: 0;
63
+        animation-name: cloudLeft;
64
+        animation-duration: 2s;
65
+        animation-timing-function: linear;
66
+        animation-fill-mode: forwards;
67
+        animation-delay: 1s;
55 68
       }
56
-      &__child {
57
-        position: absolute;
58
-        &.left {
59
-          width: 80px;
69
+      &.mid {
70
+        width: 46px;
71
+        top: 10px;
72
+        left: 420px;
73
+        opacity: 0;
74
+        animation-name: cloudMid;
75
+        animation-duration: 2s;
76
+        animation-timing-function: linear;
77
+        animation-fill-mode: forwards;
78
+        animation-delay: 1.2s;
79
+      }
80
+      &.right {
81
+        width: 62px;
82
+        top: 100px;
83
+        left: 500px;
84
+        opacity: 0;
85
+        animation-name: cloudRight;
86
+        animation-duration: 2s;
87
+        animation-timing-function: linear;
88
+        animation-fill-mode: forwards;
89
+        animation-delay: 1s;
90
+      }
91
+      @keyframes cloudLeft {
92
+        0% {
60 93
           top: 17px;
61 94
           left: 220px;
62 95
           opacity: 0;
63
-          animation-name: cloudLeft;
64
-          animation-duration: 2s;
65
-          animation-timing-function: linear;
66
-          animation-fill-mode: forwards;
67
-          animation-delay: 1s;
68 96
         }
69
-        &.mid {
70
-          width: 46px;
97
+        20% {
98
+          top: 33px;
99
+          left: 188px;
100
+          opacity: 1;
101
+        }
102
+        80% {
103
+          top: 81px;
104
+          left: 92px;
105
+          opacity: 1;
106
+        }
107
+        100% {
108
+          top: 97px;
109
+          left: 60px;
110
+          opacity: 0;
111
+        }
112
+      }
113
+      @keyframes cloudMid {
114
+        0% {
71 115
           top: 10px;
72 116
           left: 420px;
73 117
           opacity: 0;
74
-          animation-name: cloudMid;
75
-          animation-duration: 2s;
76
-          animation-timing-function: linear;
77
-          animation-fill-mode: forwards;
78
-          animation-delay: 1.2s;
79 118
         }
80
-        &.right {
81
-          width: 62px;
119
+        20% {
120
+          top: 40px;
121
+          left: 360px;
122
+          opacity: 1;
123
+        }
124
+        70% {
125
+          top: 130px;
126
+          left: 180px;
127
+          opacity: 1;
128
+        }
129
+        100% {
130
+          top: 160px;
131
+          left: 120px;
132
+          opacity: 0;
133
+        }
134
+      }
135
+      @keyframes cloudRight {
136
+        0% {
82 137
           top: 100px;
83 138
           left: 500px;
84 139
           opacity: 0;
85
-          animation-name: cloudRight;
86
-          animation-duration: 2s;
87
-          animation-timing-function: linear;
88
-          animation-fill-mode: forwards;
89
-          animation-delay: 1s;
90 140
         }
91
-        @keyframes cloudLeft {
92
-          0% {
93
-            top: 17px;
94
-            left: 220px;
95
-            opacity: 0;
96
-          }
97
-          20% {
98
-            top: 33px;
99
-            left: 188px;
100
-            opacity: 1;
101
-          }
102
-          80% {
103
-            top: 81px;
104
-            left: 92px;
105
-            opacity: 1;
106
-          }
107
-          100% {
108
-            top: 97px;
109
-            left: 60px;
110
-            opacity: 0;
111
-          }
141
+        20% {
142
+          top: 120px;
143
+          left: 460px;
144
+          opacity: 1;
112 145
         }
113
-        @keyframes cloudMid {
114
-          0% {
115
-            top: 10px;
116
-            left: 420px;
117
-            opacity: 0;
118
-          }
119
-          20% {
120
-            top: 40px;
121
-            left: 360px;
122
-            opacity: 1;
123
-          }
124
-          70% {
125
-            top: 130px;
126
-            left: 180px;
127
-            opacity: 1;
128
-          }
129
-          100% {
130
-            top: 160px;
131
-            left: 120px;
132
-            opacity: 0;
133
-          }
146
+        80% {
147
+          top: 180px;
148
+          left: 340px;
149
+          opacity: 1;
134 150
         }
135
-        @keyframes cloudRight {
136
-          0% {
137
-            top: 100px;
138
-            left: 500px;
139
-            opacity: 0;
140
-          }
141
-          20% {
142
-            top: 120px;
143
-            left: 460px;
144
-            opacity: 1;
145
-          }
146
-          80% {
147
-            top: 180px;
148
-            left: 340px;
149
-            opacity: 1;
150
-          }
151
-          100% {
152
-            top: 200px;
153
-            left: 300px;
154
-            opacity: 0;
155
-          }
151
+        100% {
152
+          top: 200px;
153
+          left: 300px;
154
+          opacity: 0;
156 155
         }
157 156
       }
158 157
     }
159
-    .bullshit {
160
-      position: relative;
158
+  }
159
+  .bullshit {
160
+    position: relative;
161
+    float: left;
162
+    width: 300px;
163
+    padding: 150px 0;
164
+    overflow: hidden;
165
+    &__oops {
166
+      font-size: 32px;
167
+      font-weight: bold;
168
+      line-height: 40px;
169
+      color: #1482f0;
170
+      opacity: 0;
171
+      margin-bottom: 20px;
172
+      animation-name: slideUp;
173
+      animation-duration: 0.5s;
174
+      animation-fill-mode: forwards;
175
+    }
176
+    &__headline {
177
+      font-size: 20px;
178
+      line-height: 24px;
179
+      color: #1482f0;
180
+      opacity: 0;
181
+      margin-bottom: 10px;
182
+      animation-name: slideUp;
183
+      animation-duration: 0.5s;
184
+      animation-delay: 0.1s;
185
+      animation-fill-mode: forwards;
186
+    }
187
+    &__info {
188
+      font-size: 13px;
189
+      line-height: 21px;
190
+      color: grey;
191
+      opacity: 0;
192
+      margin-bottom: 30px;
193
+      animation-name: slideUp;
194
+      animation-duration: 0.5s;
195
+      animation-delay: 0.2s;
196
+      animation-fill-mode: forwards;
197
+    }
198
+    &__return-home {
199
+      display: block;
161 200
       float: left;
162
-      width: 300px;
163
-      padding: 150px 0;
164
-      overflow: hidden;
165
-      &__oops {
166
-        font-size: 32px;
167
-        font-weight: bold;
168
-        line-height: 40px;
169
-        color: #1482f0;
170
-        opacity: 0;
171
-        margin-bottom: 20px;
172
-        animation-name: slideUp;
173
-        animation-duration: 0.5s;
174
-        animation-fill-mode: forwards;
175
-      }
176
-      &__headline {
177
-        font-size: 20px;
178
-        line-height: 24px;
179
-        color: #1482f0;
180
-        opacity: 0;
181
-        margin-bottom: 10px;
182
-        animation-name: slideUp;
183
-        animation-duration: 0.5s;
184
-        animation-delay: 0.1s;
185
-        animation-fill-mode: forwards;
186
-      }
187
-      &__info {
188
-        font-size: 13px;
189
-        line-height: 21px;
190
-        color: grey;
191
-        opacity: 0;
192
-        margin-bottom: 30px;
193
-        animation-name: slideUp;
194
-        animation-duration: 0.5s;
195
-        animation-delay: 0.2s;
196
-        animation-fill-mode: forwards;
197
-      }
198
-      &__return-home {
199
-        display: block;
200
-        float: left;
201
-        width: 110px;
202
-        height: 36px;
203
-        background: #1482f0;
204
-        border-radius: 100px;
205
-        text-align: center;
206
-        color: #ffffff;
201
+      width: 110px;
202
+      height: 36px;
203
+      background: #1482f0;
204
+      border-radius: 100px;
205
+      text-align: center;
206
+      color: #ffffff;
207
+      opacity: 0;
208
+      font-size: 14px;
209
+      line-height: 36px;
210
+      cursor: pointer;
211
+      animation-name: slideUp;
212
+      animation-duration: 0.5s;
213
+      animation-delay: 0.3s;
214
+      animation-fill-mode: forwards;
215
+    }
216
+    @keyframes slideUp {
217
+      0% {
218
+        transform: translateY(60px);
207 219
         opacity: 0;
208
-        font-size: 14px;
209
-        line-height: 36px;
210
-        cursor: pointer;
211
-        animation-name: slideUp;
212
-        animation-duration: 0.5s;
213
-        animation-delay: 0.3s;
214
-        animation-fill-mode: forwards;
215 220
       }
216
-      @keyframes slideUp {
217
-        0% {
218
-          transform: translateY(60px);
219
-          opacity: 0;
220
-        }
221
-        100% {
222
-          transform: translateY(0);
223
-          opacity: 1;
224
-        }
221
+      100% {
222
+        transform: translateY(0);
223
+        opacity: 1;
225 224
       }
226 225
     }
227 226
   }
227
+}
228
+
228 229
 </style>

+ 1 - 1
src/views/layout/Layout.vue

@@ -48,7 +48,7 @@
48 48
                     }
49 49
                 }
50 50
             }
51
-            .main-container{
51
+            .main-container {
52 52
                 margin-left: 40px;
53 53
             }
54 54
         }

+ 8 - 8
src/views/layout/Levelbar.vue

@@ -37,13 +37,13 @@
37 37
 
38 38
 <style rel="stylesheet/scss" lang="scss" scoped>
39 39
     .app-levelbar.el-breadcrumb {
40
-        display: inline-block;
41
-        font-size: 14px;
42
-        line-height: 50px;
43
-        margin-left: 10px;
44
-        .no-redirect{
45
-          color: #97a8be;
46
-          cursor:text;
47
-        }
40
+      display: inline-block;
41
+      font-size: 14px;
42
+      line-height: 50px;
43
+      margin-left: 10px;
44
+      .no-redirect {
45
+        color: #97a8be;
46
+        cursor: text;
47
+      }
48 48
     }
49 49
 </style>

+ 8 - 9
src/views/layout/Navbar.vue

@@ -10,7 +10,7 @@
10 10
             <el-dropdown-menu class="user-dropdown" slot="dropdown">
11 11
                 <router-link class='inlineBlock' to="/">
12 12
                     <el-dropdown-item>
13
-                        首页
13
+                        Home
14 14
                     </el-dropdown-item>
15 15
                 </router-link>
16 16
                 <el-dropdown-item divided><span @click="logout" style="display:block;">退出登录</span></el-dropdown-item>
@@ -32,7 +32,6 @@
32 32
       computed: {
33 33
         ...mapGetters([
34 34
           'sidebar',
35
-          'name',
36 35
           'avatar'
37 36
         ])
38 37
       },
@@ -42,7 +41,7 @@
42 41
         },
43 42
         logout() {
44 43
           this.$store.dispatch('LogOut').then(() => {
45
-            location.reload();// 为了重新实例化vue-router对象 避免bug
44
+            location.reload();  // 为了重新实例化vue-router对象 避免bug
46 45
           });
47 46
         }
48 47
       }
@@ -65,11 +64,11 @@
65 64
             position: absolute;
66 65
             right: 150px;
67 66
         }
68
-        .screenfull{
69
-             position: absolute;
70
-             right: 90px;
71
-             top: 16px;
72
-             color: red;
67
+        .screenfull {
68
+            position: absolute;
69
+            right: 90px;
70
+            top: 16px;
71
+            color: red;
73 72
         }
74 73
         .avatar-container {
75 74
             height: 50px;
@@ -78,7 +77,7 @@
78 77
             right: 35px;
79 78
             .avatar-wrapper {
80 79
                 cursor: pointer;
81
-                margin-top:5px;
80
+                margin-top: 5px;
82 81
                 position: relative;
83 82
                 .user-avatar {
84 83
                     width: 40px;

+ 4 - 3
src/views/layout/Sidebar.vue

@@ -18,7 +18,8 @@
18 18
 </script>
19 19
 
20 20
 <style rel="stylesheet/scss" lang="scss" scoped>
21
-    .el-menu {
22
-        min-height: 100%;
23
-    }
21
+.el-menu {
22
+    min-height: 100%;
23
+}
24
+
24 25
 </style>

+ 0 - 1
src/views/layout/SidebarItem.vue

@@ -24,7 +24,6 @@
24 24
 </template>
25 25
 
26 26
 <script>
27
-
28 27
     export default {
29 28
       name: 'SidebarItem',
30 29
       props: {

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

@@ -1,32 +1,30 @@
1 1
 <template>
2
-    <div class="login-container">
3
-        <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left"
4
-                 label-width="0px"
5
-                 class="card-box login-form">
6
-            <h3 class="title">系统登录</h3>
7
-            <el-form-item prop="email">
8
-                <span class="svg-container">
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">
5
+      <h3 class="title">系统登录</h3>
6
+      <el-form-item prop="email">
7
+        <span class="svg-container">
9 8
                   <icon-svg icon-class="jiedianyoujian"></icon-svg>
10 9
                 </span>
11
-                <el-input name="email" type="text" v-model="loginForm.email" autoComplete="on"
12
-                          placeholder="邮箱"></el-input>
13
-            </el-form-item>
14
-            <el-form-item prop="password">
15
-                <span class="svg-container">
10
+        <el-input name="email" type="text" v-model="loginForm.email" autoComplete="on" placeholder="邮箱"></el-input>
11
+      </el-form-item>
12
+      <el-form-item prop="password">
13
+        <span class="svg-container">
16 14
                   <icon-svg icon-class="mima" ></icon-svg>
17 15
                 </span>
18
-                <el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password"
19
-                          autoComplete="on" placeholder="密码"></el-input>
20
-            </el-form-item>
21
-            <el-form-item>
22
-                <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
23
-                    登录
24
-                </el-button>
25
-            </el-form-item>
26
-            <div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
27
-            <div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
28
-        </el-form>
29
-    </div>
16
+        <el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
17
+          placeholder="密码"></el-input>
18
+      </el-form-item>
19
+      <el-form-item>
20
+        <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
21
+          登录
22
+        </el-button>
23
+      </el-form-item>
24
+      <div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
25
+      <div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
26
+    </el-form>
27
+  </div>
30 28
 </template>
31 29
 
32 30
 <script>
@@ -52,7 +50,7 @@
52 50
         return {
53 51
           loginForm: {
54 52
             email: 'admin@wallstreetcn.com',
55
-            password: ''
53
+            password: '111111'
56 54
           },
57 55
           loginRules: {
58 56
             email: [
@@ -88,67 +86,62 @@
88 86
 
89 87
 <style rel="stylesheet/scss" lang="scss">
90 88
     @import "src/styles/mixin.scss";
91
-    .tips{
89
+    .tips {
92 90
       font-size: 14px;
93 91
       color: #fff;
94 92
       margin-bottom: 5px;
95 93
     }
96
-    .login-container {
97
-        @include relative;
98
-        height: 100vh;
99
-        background-color: #2d3a4b;
100
-
101
-        input:-webkit-autofill {
102
-            -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
103
-            -webkit-text-fill-color: #fff !important;
104
-        }
105
-        input {
106
-            background: transparent;
107
-            border: 0px;
108
-            -webkit-appearance: none;
109
-            border-radius: 0px;
110
-            padding: 12px 5px 12px 15px;
111
-            color: #eeeeee;
112
-            height: 47px;
113
-        }
114
-        .el-input {
115
-            display: inline-block;
116
-            height: 47px;
117
-            width: 85%;
118
-        }
119
-        .svg-container {
120
-            padding: 6px 5px 6px 15px;
121
-            color: #889aa4;
122
-        }
123
-
124
-        .title {
125
-            font-size: 26px;
126
-            font-weight: 400;
127
-            color: #eeeeee;
128
-            margin: 0px auto 40px auto;
129
-            text-align: center;
130
-            font-weight: bold;
131
-        }
132
-
133
-        .login-form {
134
-            position: absolute;
135
-            left: 0;
136
-            right: 0;
137
-            width: 400px;
138
-            padding: 35px 35px 15px 35px;
139
-            margin: 120px auto;
140
-        }
141
-
142
-        .el-form-item {
143
-            border: 1px solid rgba(255, 255, 255, 0.1);
144
-            background: rgba(0, 0, 0, 0.1);
145
-            border-radius: 5px;
146
-            color: #454545;
147
-        }
148 94
 
149
-        .forget-pwd {
150
-            color: #fff;
151
-        }
95
+    .login-container {
96
+      @include relative;
97
+      height: 100vh;
98
+      background-color: #2d3a4b;
99
+      input:-webkit-autofill {
100
+        -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
101
+        -webkit-text-fill-color: #fff !important;
102
+      }
103
+      input {
104
+        background: transparent;
105
+        border: 0px;
106
+        -webkit-appearance: none;
107
+        border-radius: 0px;
108
+        padding: 12px 5px 12px 15px;
109
+        color: #eeeeee;
110
+        height: 47px;
111
+      }
112
+      .el-input {
113
+        display: inline-block;
114
+        height: 47px;
115
+        width: 85%;
116
+      }
117
+      .svg-container {
118
+        padding: 6px 5px 6px 15px;
119
+        color: #889aa4;
120
+      }
121
+      .title {
122
+        font-size: 26px;
123
+        font-weight: 400;
124
+        color: #eeeeee;
125
+        margin: 0px auto 40px auto;
126
+        text-align: center;
127
+        font-weight: bold;
128
+      }
129
+      .login-form {
130
+        position: absolute;
131
+        left: 0;
132
+        right: 0;
133
+        width: 400px;
134
+        padding: 35px 35px 15px 35px;
135
+        margin: 120px auto;
136
+      }
137
+      .el-form-item {
138
+        border: 1px solid rgba(255, 255, 255, 0.1);
139
+        background: rgba(0, 0, 0, 0.1);
140
+        border-radius: 5px;
141
+        color: #454545;
142
+      }
143
+      .forget-pwd {
144
+        color: #fff;
145
+      }
152 146
     }
153
-
154 147
 </style>

+ 21 - 20
src/views/table/index.vue

@@ -33,25 +33,26 @@
33 33
 </template>
34 34
 
35 35
 <script>
36
-import { getList } from '@/api/table';
37
-export default {
38
-  data() {
39
-    return {
40
-      list: null,
41
-      listLoading: true
42
-    }
43
-  },
44
-  created() {
45
-    this.fetchData();
46
-  },
47
-  methods: {
48
-    fetchData() {
49
-      this.listLoading = true;
50
-      getList(this.listQuery).then(response => {
51
-        this.list = response.data.items;
52
-        this.listLoading = false;
53
-      })
36
+  import { getList } from '@/api/table';
37
+
38
+  export default {
39
+    data() {
40
+      return {
41
+        list: null,
42
+        listLoading: true
43
+      }
44
+    },
45
+    created() {
46
+      this.fetchData();
47
+    },
48
+    methods: {
49
+      fetchData() {
50
+        this.listLoading = true;
51
+        getList(this.listQuery).then(response => {
52
+          this.list = response.data.items;
53
+          this.listLoading = false;
54
+        })
55
+      }
54 56
     }
55
-  }
56
-};
57
+  };
57 58
 </script>