张延森 il y a 4 ans
Parent
révision
7618bae05a
1 fichiers modifiés avec 21 ajouts et 15 suppressions
  1. 21
    15
      src/layout/index.vue

+ 21
- 15
src/layout/index.vue Voir le fichier

@@ -1,14 +1,16 @@
1 1
 <template>
2 2
   <div class="layout">
3
-    <div>
3
+    <div class="lay-header">
4 4
       <router-view />
5 5
     </div>
6 6
 
7
-    <van-tabbar route>
8
-      <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
9
-       <van-tabbar-item replace to="/addhouse" icon="add-o">录入</van-tabbar-item>
10
-      <van-tabbar-item replace to="/user" icon="user-o">我的</van-tabbar-item>
11
-    </van-tabbar>
7
+    <div class="lay-footer">
8
+      <van-tabbar route>
9
+        <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
10
+        <van-tabbar-item replace to="/addhouse" icon="add-o">录入</van-tabbar-item>
11
+        <van-tabbar-item replace to="/user" icon="user-o">我的</van-tabbar-item>
12
+      </van-tabbar>
13
+    </div>
12 14
   </div>
13 15
 </template>
14 16
 
@@ -31,16 +33,20 @@ export default {
31 33
 </script>
32 34
 
33 35
 <!-- Add "scoped" attribute to limit CSS to this component only -->
34
-<style scoped>
35
-
36
-.secondhand-main {
37
-  width: 100%;
38
-  height: calc(100vh - 142px);
36
+<style lang="less" scoped>
37
+.layout {
38
+  display: flex;
39
+  flex-direction: column;
39 40
   overflow: hidden;
40
-  overflow-y: auto;
41
-}
42
-.secondhand-main::-webkit-scrollbar {
43
-  display: none; /*隐藏滚动条*/
41
+
42
+  .lay-header {
43
+    flex: auto;
44
+    overflow-y: auto;
45
+  }
46
+
47
+  .lay_footer {
48
+    flex: none;
49
+  }
44 50
 }
45 51
 
46 52
 </style>