Some of the needs of users that slide up and down the screen to hide out certain requirements of the display area. Or a slide show content when the specified position.
Do listen for events four:
a, JS comes with:
//开始滚动
onPageScroll (e) {
console.log('滚起来')
},
This is not sensitive enough to listen, more BUg.
Second, the gesture events
<view class="wrapIndex" bindtouchstart="touchStart" bindtouchend="touchEnd"></view>
touchStart(e){
//console.log('滚起来', e);
this.setData({
scrollStop: false
})
},
touchEnd(e){
// console.log('停下来', e);
this.setData({
scrollStop: true
})
},
The more sensitive easy to use. But it can not be arbitrary. At least one can be operated in full screen.
Three, scroll-view assembly
four, scroll-into-view property.
Thirty-four reference may be scroll-view components:
https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html