vue-pull-infinite-scroller
vue-pull-infinite-scroller is a native scrolling component that performs well in a webview, pull to refresh & infinite loading.
How to use
npm i vue-pull-infinite-scroller -S
import Vue from 'vue'
import VuePullInfiniteScroller from 'vue-pull-infinite-scroller'
Vue.use(VuePullInfiniteScroller)
<pull-infinite-scroller
:on-refresh="refresh"
:on-infinite="infinite">
<!-- content goes here -->
</pull-infinite-scroller>
methods: {
refresh: function (done) {
// ajax
done();
},
infinite: function (done) {
// ajax
// success
// go on
done()
// end
done('end')
// error
done('error')
}
}