uniapp某个容器滚动到底部事件

1.标签中

<scroll-view class="" scroll-y="true" style="height: 400rpx;overflow: scroll;" class="scroll-Y" @scrolltolower="lower">
                                    <view class="meberItem" v-for="(v,i) in resignUserList.rows">
                                        <view class="">
                                            <image :src="v.avatarMediaid" mode="widthFix"
                                                style="width: 96rpx;vertical-align: middle;margin-right: 25rpx;border-radius: 10rpx;">
                                            </image>
                                            {{v.name}}
                                        </view>
                                        <view class="">
                                            <u-radio :customStyle="{marginTop: '8px'}" :key="i" :name="v.userId+'-'+v.name"
                                                @change="radioChange">
                                            </u-radio>
                                        </view>
                                    </view>
                                </scroll-view>

2.js代码

lower(){
                    // alert(0)
                    this.curpage++;
                    console.log('当前页数', this.curpage);
                    if (this.curpage > Math.ceil(this.pageTotal)) {
                        uni.showToast({
                            title: '已经是最后一页了',
                            icon: 'none'
                        });
                        return;
                    } else {
                        this.getResignUser();
                    }
                },

 

posted on 2022-05-11 14:59  樱桃小王子yummy  阅读(1208)  评论(0)    收藏  举报

导航