uniapp onPullDownRefresh 下拉刷新小坑

        onPullDownRefresh() {
            uni.request({
                url:''
                success: (res) => {
                    uni.stopPullDownRefresh()
                }
            })
        },

在做小程序的时候经常遇上下拉刷新的需求,但是这里有个小坑,如果不使用uni.stopPullDownRefresh(),刷新就不会自动停止,所以一定要在业务代码结束后使用uni.stopPullDownRefresh()(或者是在回调中,比如我的例子就是在网络请求的回调中使用)

posted @ 2020-04-02 18:26  zhangPooo  阅读(11223)  评论(2编辑  收藏  举报