在list中使用onloadmore方法,loadmoreoffset设成0,在iOS中该方法,可以顺利触发,但是在Android中无法触发,有没有遇到过类似问题的童鞋,分享一下经验,有的人用却说可以。。。
<list style='width: 750; height: {{colHeight}}; background-color: #f4f4f4;' onloadmore='onloadmore' loadmoreoffset=0>
<refresh onrefresh='refresh' display="{{refreshing ? 'show' : 'hide'}}" style='flex-direction: row; justify-content: center; align-items: center; width: 750; height: 100;'>
<text style='font-size: 28;'>松开马上为您刷新</text>
<loading-indicator style='width: 70; height: 70; color: #a9a9a9; margin-left: 24;'></loading-indicator>
</refresh>
<cell scope='goods' repeat="{{item in searchResults}}" style='width: 750; height: 515;'>
<two-goods goods="{{ item }}"></two-goods>
</cell>
<cell style='width: 750; height: 24;'></cell>
</list>
原因&解决
在Android sdk中,找到loadmore
事件触发的方法,发现当loadmoreoffset=0
时,不会触发方法, 我用的是0.11.0-rc0版本的SDK,
我把loadmore设成1就可以触发了。
官方文档上用的是
loadmore
事件,不是onloadmore
,前者我在android和iOS上是正常使用的,请试试