scroll-view的滚动触底事件

问题: bindscrolltolower="nextPage" ,已经加了触底事件了,但是怎么都触发不了

<scroll-view class="list" bindscrolltolower="nextPage" 
            scroll-with-animation>
</scroll-view>

解决:

需要固定一个高度,指定滚动方向 :scroll-y style="height:{ {windowHeight-nav_height}}px;"

<scroll-view class="list" bindscrolltolower="nextPage" scroll-y style="height:{
   
   {windowHeight-nav_height}}px;"
               wx:if="{
   
   {filterList.length>0}}" scroll-with-animation>

其他原因:第一个分页数据过少的情况下,也可能因为没有填充满当前高度导致无法触发,这个触底事件。

参考:

scroll-view的滚动触底事件有概率不触发 | 微信开放社区

猜你喜欢

转载自blog.csdn.net/LlanyW/article/details/132141979
今日推荐