小程序中使用scroll-view组件,内容高度未超过容器高度时依然可以上下滑动小段距离的问题
<view class="home-page">
<scroll-view class="scroll-box" scroll-y="{{true}}" style="height: {{scrollBoxHeight}};"
scroll-with-animation="{{true}}" upper-threshold="{{50}}" lower-threshold="{{50}}"
bindscrolltoupper="handleScrollToupper" bindscrolltolower="handleScrolltolower" bindscroll="scroll">
<!-- <view class="test-box" >测试测试测试</view> -->
<view class="nav-bar-box {{navBarSticky === true ? 'nav-bar-sticky': ''}}">
<nav-bar bind:switchChannel="switchChannel" activeChannel="{{}}"></nav-bar>
</view>
<view tt:if="{{navBarSticky}}" style="height: {{navBarDistance}}"></view>
<view class="template-list-item">
<template-list tt:if="{{ > 0}}" dataList="{{dataList}}" activeChannel="{{}}"></template-list>
</view>
<view class="no-data" tt:if="{{hasAllData}}">
<text>没有更多了</text>
</view>
</scroll-view>
</view>