uniapp scroll-view
<view class="flex1">
<scroll-view
style="height: 100%;"
:scroll-top="scrollTop"
scroll-y="true"
scroll-with-animation="true"
refresher-enabled="true"
:refresher-triggered="isRefresh"
@refresherrefresh="refresherrefresh"
@scrolltolower="lower"
>
<view class="scroll-view-item" v-for="i in 10">
...
</view>
</scroll-view>
</view>
在tabbar页面中使用100vh
.container
position relative
display flex
flex-direction column
overflow hidden
/* #ifdef H5 */
height unquote('calc(100vh - var(--window-bottom))')
/* #endif */
/* #ifdef MP-WEIXIN */
height 100vh
/* #endif */
关掉h5的titleNView
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"h5": {
"titleNView": false
}
}
},
}
}