小程序 scroll-view 无法触发 onReachBottom 解决办法

时间:2020-04-21 14:58:30   收藏:0   阅读:366
<scroll-view bindscrolltolower="YourFunction" lower-threshold=“50”></scroll-view>

 

1 YoourFunction(){
2     console.log("触底了");
3     wx.showToast({
4       title: ‘加载中...‘,
5       icon: ‘loading‘,
6       duration: 2000
7     })
8 }

 

bindscrolltolower eventhandle  滚动到底部/右边时触发

lower-threshold number/string 距底部/右边多远时,触发 scrolltolower 事件

文档:https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!