Browse Source

keep in sync with vue-element-admin

Pan 6 years ago
parent
commit
3fd9a8465e

+ 1 - 0
src/styles/sidebar.scss

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

+ 16 - 9
src/views/404.vue

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

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

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

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

@@ -17,3 +17,12 @@ export default {
17 17
   }
18 18
 }
19 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 1
 <template>
2 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 4
       <el-table-column align="center" label='ID' width="95">
5 5
         <template slot-scope="scope">
6 6
           {{scope.$index}}