最近学习微信小程序,用到了scroll-view控件,发现bindscrolltolower事件总是不能触发,修改后可正常触发了,注意下面几点
-
scroll-y="true"
-
bindscrolltolower="loadMore"
-
style='height:100%'
.wxml
<scroll-view scroll-y="true" class="page-body" bindscrolltolower="loadMore" lower-threshold="100" style='height:100%'>
<view>
<template is="jokeItem" data="{{item}}" wx:for="{{jokeList}}"/>
<template is="loadindFooter" data="{{hideFooter}}"/>
</view>
</scroll-view>
.wxss
page
{
width:100%;
height:100%;
}
scroll-view
{
height:100%;
}
.js
loadMore()
{
console.log('loadMore')
}