关于最新版本的 bindscrolltolower

发布于 7 年前作者 guiying5219620 次浏览最后编辑 7 年前来自 ask

现在版本中 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 回复
xiulan89
xiulan891 楼6 年前

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

maoyong
maoyong2 楼6 年前

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

taochen
taochen3 楼6 年前

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

jfan
jfan4 楼6 年前

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

guiying32
guiying325 楼6 年前

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

nafu
nafu6 楼6 年前

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

ezhong
ezhong7 楼6 年前

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

vmeng
vmeng8 楼6 年前

有找到解决方案吗

llin
llin9 楼6 年前

<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这个值滚动停止后,出现抖动,值在值里变化

duanmin
duanmin10 楼5 年前

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