sunran vor 3 Jahren
Ursprung
Commit
b7aa734053
1 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen
  1. 9 3
      src/views/zhulao/views/classRoom/index.vue

+ 9 - 3
src/views/zhulao/views/classRoom/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="page">
-    <van-nav-bar title="老年课堂" fixed placeholder safe-area-inset-top />
-    <van-tabs @click="clickTab" sticky offset-top="46">
-      <van-tab v-for="item in columnList" sticky :key="item.id" :title="item.title" :name="item.columnCode">
+    <van-nav-bar ref="nav" title="老年课堂" fixed />
+    <van-tabs @click="clickTab" sticky>
+      <van-tab v-for="item in columnList" :key="item.id" :title="item.title" :name="item.columnCode">
         <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
           <div v-for="(item,index) in info" :key='index' bindtap="videoCilck" @click="$router.push({path:'/newsDetails',query:{id:item.id}})">
             <div class='videoBg' v-if='item.coverImgUrl'>
@@ -41,8 +41,13 @@ export default {
       finished: false,
       pageNum: 1,
       pageSize: 10,
+      navheight: '46px',
     }
   },
+  mounted() {
+    this.navheight = this.$refs.nav.$refs.navBar.offsetHeight + 'px'
+    console.log(this.navheight, '22')
+  },
   created() {
     this.getColumnList()
   },
@@ -95,6 +100,7 @@ export default {
   height: 100%;
 }
 .van-tabs {
+  margin-top: 92px;
   border-bottom: 0;
   ::v-deep .van-tab {
     font-size: 30px;