美文网首页
uniapp开发小程序中scroll-view无法触发onRea

uniapp开发小程序中scroll-view无法触发onRea

作者: 吴wuwu | 来源:发表于2021-08-12 16:26 被阅读0次
<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 滚动到底部/右边时触发

相关文章

网友评论

      本文标题:uniapp开发小程序中scroll-view无法触发onRea

      本文链接:https://www.haomeiwen.com/subject/oxslbltx.html