9***@qq.com
9***@qq.com
  • 发布:2020-02-05 11:22
  • 更新:2020-03-25 14:13
  • 阅读:4712

使用了var(--status-bar-height)和var(--window-bottom)后page页还是超出滚动

分类:uni-app


就是这样的页面,在H5端page页会超出滚动,微信小程序没问题,文档说H5端要减掉tabbar和导航栏高度,已经按照要求减掉了,还是会滚动。

// index.vue

<template>  
    <view class="content">  
        <!-- 引用swiper-tabbar组件 -->  
        <swiper-tabbar :tabBars="tabBars" :currTabIndex="currTabIndex" :newsList="newsList" :status="loadMoreStatus" @tabtap="tabtap"  
         @onLoadMore="onLoadMore">  
            <!-- 引用index-list组件,slot传值 -->  
            <template v-slot="{ item }">  
                <index-list :item="item"></index-list>  
            </template>  
        </swiper-tabbar>  
    </view>  
</template>
<style scoped>  
    .content {  
        width: 750rpx;  
        /* #ifdef MP-WEIXIN */  
        height: 100vh;  
        /* #endif */  
        /* #ifndef MP-WEIXIN */  
        height: calc(100vh - var(--status-bar-height) - var(--window-bottom));  
        /* #endif */  
        /* overflow: hidden; */  
    }  
</style>
2020-02-05 11:22 负责人:无 分享
已邀请:
握瑾怀瑜

握瑾怀瑜

可用,感谢

该问题目前已经被锁定, 无法添加新回复