关于最新版本的 bindscrolltolower
发布于 5 年前 作者 guiying52 19438 次浏览 来自 问答

现在版本中 scroll-view 的 bindscrolltolower="lower"事件,当滚动条滚动到最底部的时候 lower()会执行多次,以前的版本没问题,最近发现存在此问题。测试代码如下:

【wxml】

 <scroll-view scroll-y=“true” style=“height: 200px;”  bindscrolltolower=“lower” >

    <view  style=“width:100%;height:800rpx;background-color:red”></view>

  </scroll-view>

【js】

var a =1

Page({

  data:{

 

  },

  onLoad:function(options){

    // 生命周期函数–监听页面加载

 

  },lower: function() {  //下拉加载

        a=a+1

        console.log(a)

  }

})

当下拉到底部时,lower()会执行多次,次数不固定。

10 回复

你们已解决。。。这个怎么解决的?

哪位大神解决了 ,加了判断也没用??

只要超过lowerthreshold就会触发,建议加个判断避免重复加载

这里的帖子有官方的人看么

我也碰到这个问题了,谁解决了,谢谢了

为什么一个没有解决的问题   会被设置已解决

我也遇到这个问题了,还有其他办法做下拉加载吗?

有找到解决方案吗

<scroll-view  scroll-y=“true” scroll-top="{{curScrollTop}}"  class=“nav_scroll” style=“height: {{scrollHeightA}}px” bindscrolltolower=“loadMore” bindscroll=“scroll”> 

    <template is=“articalList” data="{{articles}}"/>

</scroll-view>

scroll-top这个值滚动停止后,出现抖动,值在值里变化

我的也出现了这个情况,scroll-view的bindscrolltoupper、bindscrolltolower事件都有可能执行多次

回到顶部