Browse Source

keep in sync with vue-element-admin

Pan 7 years ago
parent
commit
3fd9a8465e

+ 1 - 0
src/styles/sidebar.scss

@@ -4,6 +4,7 @@
4
     min-height: 100%;
4
     min-height: 100%;
5
     transition: margin-left .28s;
5
     transition: margin-left .28s;
6
     margin-left: 180px;
6
     margin-left: 180px;
7
+    position: relative;
7
   }
8
   }
8
   // 侧边栏
9
   // 侧边栏
9
   .sidebar-container {
10
   .sidebar-container {

+ 16 - 9
src/views/404.vue

@@ -1,5 +1,5 @@
1
 <template>
1
 <template>
2
-  <div style="background:#f0f2f5;margin-top: -20px;">
2
+  <div class="wscn-http404-container">
3
     <div class="wscn-http404">
3
     <div class="wscn-http404">
4
       <div class="pic-404">
4
       <div class="pic-404">
5
         <img class="pic-404__parent" :src="img_404" alt="404">
5
         <img class="pic-404__parent" :src="img_404" alt="404">
@@ -9,7 +9,9 @@
9
       </div>
9
       </div>
10
       <div class="bullshit">
10
       <div class="bullshit">
11
         <div class="bullshit__oops">OOPS!</div>
11
         <div class="bullshit__oops">OOPS!</div>
12
-        <div class="bullshit__info">版权所有<a class="link-type" href="https://wallstreetcn.com" target='_blank'>华尔街见闻</a></div>
12
+        <div class="bullshit__info">版权所有
13
+          <a class='link-type' href='https://wallstreetcn.com' target='_blank'>华尔街见闻</a>
14
+        </div>
13
         <div class="bullshit__headline">{{ message }}</div>
15
         <div class="bullshit__headline">{{ message }}</div>
14
         <div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
16
         <div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
15
         <a href="" class="bullshit__return-home">返回首页</a>
17
         <a href="" class="bullshit__return-home">返回首页</a>
@@ -23,6 +25,7 @@ import img_404 from '@/assets/404_images/404.png'
23
 import img_404_cloud from '@/assets/404_images/404_cloud.png'
25
 import img_404_cloud from '@/assets/404_images/404_cloud.png'
24
 
26
 
25
 export default {
27
 export default {
28
+  name: 'page404',
26
   data() {
29
   data() {
27
     return {
30
     return {
28
       img_404,
31
       img_404,
@@ -31,24 +34,28 @@ export default {
31
   },
34
   },
32
   computed: {
35
   computed: {
33
     message() {
36
     message() {
34
-      return '特朗普说这个页面你不能进......'
37
+      return '网管说这个页面你不能进......'
35
     }
38
     }
36
   }
39
   }
37
 }
40
 }
38
 </script>
41
 </script>
39
 
42
 
40
 <style rel="stylesheet/scss" lang="scss" scoped>
43
 <style rel="stylesheet/scss" lang="scss" scoped>
44
+.wscn-http404-container{
45
+  transform: translate(-50%,-50%);
46
+  position: absolute;
47
+  top: 40%;
48
+  left: 50%;
49
+}
41
 .wscn-http404 {
50
 .wscn-http404 {
42
   position: relative;
51
   position: relative;
43
   width: 1200px;
52
   width: 1200px;
44
-  margin: 20px auto 60px;
45
-  padding: 0 100px;
53
+  padding: 0 50px;
46
   overflow: hidden;
54
   overflow: hidden;
47
   .pic-404 {
55
   .pic-404 {
48
     position: relative;
56
     position: relative;
49
     float: left;
57
     float: left;
50
     width: 600px;
58
     width: 600px;
51
-    padding: 150px 0;
52
     overflow: hidden;
59
     overflow: hidden;
53
     &__parent {
60
     &__parent {
54
       width: 100%;
61
       width: 100%;
@@ -160,7 +167,7 @@ export default {
160
     position: relative;
167
     position: relative;
161
     float: left;
168
     float: left;
162
     width: 300px;
169
     width: 300px;
163
-    padding: 150px 0;
170
+    padding: 30px 0;
164
     overflow: hidden;
171
     overflow: hidden;
165
     &__oops {
172
     &__oops {
166
       font-size: 32px;
173
       font-size: 32px;
@@ -176,7 +183,8 @@ export default {
176
     &__headline {
183
     &__headline {
177
       font-size: 20px;
184
       font-size: 20px;
178
       line-height: 24px;
185
       line-height: 24px;
179
-      color: #1482f0;
186
+      color: #222;
187
+      font-weight: bold;
180
       opacity: 0;
188
       opacity: 0;
181
       margin-bottom: 10px;
189
       margin-bottom: 10px;
182
       animation-name: slideUp;
190
       animation-name: slideUp;
@@ -225,5 +233,4 @@ export default {
225
     }
233
     }
226
   }
234
   }
227
 }
235
 }
228
-
229
 </style>
236
 </style>

+ 5 - 0
src/views/layout/Layout.vue

@@ -31,6 +31,7 @@ export default {
31
     classObj() {
31
     classObj() {
32
       return {
32
       return {
33
         hideSidebar: !this.sidebar.opened,
33
         hideSidebar: !this.sidebar.opened,
34
+        openSidebar: this.sidebar.opened,
34
         withoutAnimation: this.sidebar.withoutAnimation,
35
         withoutAnimation: this.sidebar.withoutAnimation,
35
         mobile: this.device === 'mobile'
36
         mobile: this.device === 'mobile'
36
       }
37
       }
@@ -51,6 +52,10 @@ export default {
51
     position: relative;
52
     position: relative;
52
     height: 100%;
53
     height: 100%;
53
     width: 100%;
54
     width: 100%;
55
+    &.mobile.openSidebar{
56
+      position: fixed;
57
+      top: 0;
58
+    }
54
   }
59
   }
55
   .drawer-bg {
60
   .drawer-bg {
56
     background: #000;
61
     background: #000;

+ 9 - 0
src/views/layout/components/AppMain.vue

@@ -17,3 +17,12 @@ export default {
17
   }
17
   }
18
 }
18
 }
19
 </script>
19
 </script>
20
+
21
+<style scoped>
22
+.app-main {
23
+  /*50 = navbar  */
24
+  min-height: calc(100vh - 50px);
25
+  position: relative;
26
+  overflow: hidden;
27
+}
28
+</style>

+ 1 - 1
src/views/table/index.vue

@@ -1,6 +1,6 @@
1
 <template>
1
 <template>
2
   <div class="app-container">
2
   <div class="app-container">
3
-    <el-table :data="list" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row>
3
+    <el-table :data="list" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row>
4
       <el-table-column align="center" label='ID' width="95">
4
       <el-table-column align="center" label='ID' width="95">
5
         <template slot-scope="scope">
5
         <template slot-scope="scope">
6
           {{scope.$index}}
6
           {{scope.$index}}