I use leancloud as the backend, taking leancloud's demo as an example. If there are 10 data in Todo, how can I limit the page to load 5 first, and then load the next 5 data after the user slides to the bottom?
代言2017-06-26 10:59:56
Use paging to implement
Call: scroll-view: https://mp.weixin.qq.com/debu...
<scroll-view style="height:500rpx;" scroll-y="true" bindscrolltoupper="loadNew" bindscrolltolower="loadMore">
<block wx:for="{{items}}">
<view class="section">
<video src="{{item.videoUrl}}" controls></video>
<text>{{item.title}}</text>
</view>
</block>
</scroll-view>
You can also use: onReachBottom
Page({
onReachBottom: function()
{
this.loadList();
}
})