vue-pull-infinite-scroller
vue-pull-infinite-scroller is a native scrolling component that performs well in a webview, pull to refresh & infinite loading.
Demo
https://bb595700239.github.io/vue-pull-infinite-scroller/dist/example/index.html
How to use
npm i vue-pull-infinite-scroller -S
Vue
<!-- content goes here -->
methods: { // ajax ; } { // ajax // success // go on // end // error }
重要
组件一定要设置固定高度
组件内包含另一种块滑动区域(如:amap)可以写在class为no_scroll
容器里
API
scroller component attributes:
Attr. Name | Description | Required | Default Value |
---|---|---|---|
onRefresh | pull to refresh callback | N | - |
onInfinite | infinite loading callback | N | - |
scroller vm instance methods:
reload()
reload scroller