scroll-view

发布于 8 年前作者 guiyingwan19305 次浏览最后编辑 8 年前来自 ask
  • 需求的场景描述(希望解决的问题)

scroll-view 只提供了一个bindscroll 的回调方法。并且代码控制滑动的位置也会调用 bindscroll 回调方法。

  • 希望提供的能力

希望提供 scrollend回调方法 和 整页滑动的属性

上次有大神告诉了我 touchend方法。但是因为  touchend 方法 要过早于回调  这时候bindscroll 还在回调。

2 回复
mcui
mcui1 楼6 年前

大家跳转小程序的时候有没有遇到过这个问题啊?navigateToMiniProgramAppIdList

leiwei
leiwei2 楼6 年前

早上为啥没看到你。。哈哈哈

是这样的,暂时没办法非常精确的监听滑动停止,我的方法是,在touchend和bindscroll里不断的 clearTimeout 和 setTimeout来模拟停止

bindscroll(e){

    clearTimeout(this.timer)

    this.timer = setTimeout({

        console.log(“滚动停止”)

    },50)

}