uniapp开发小程序中scroll-view无法触发onReachBottom解决

<scroll-view :scroll-y="true" style="height: 880rpx;" bindscrolltolower="onReachBottom" lower-threshold="50">
这是内容
<u-loadmore :status="loadStatus" @loadmore="" :load-text="loadText" v-if="CouponGoods.length>=10"></u-loadmore>
</scroll-view>

onReachBottom() {
            if(this.CouponGoods.length>=10&&this.currentList>0) {
                this.current++;
                this.getCouponGoods();
            }
        },

使用bindscrolltolower 绑定请求下一页的方法即可,但是使用scroll-view标签的话,会影响onPageScroll 函数的使用,也就是说我们获取不到页面滚动的高度
lower-threshold number/string 距底部/右边多远时,触发 scrolltolower 事件
bindscrolltolower eventhandle 滚动到底部/右边时触发

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容