vue-pull
pull
npm install vue-pull
index.vue
<template>
<ul id="pullup">
<li v-for="li in list"></li>
</ul>
</template>
import Vue from 'vue';
import pull from 'vue-pull';
Vue.use(pull);
fetchData(callback){
fetch('',{
page: this.page
})
.then(res=>{
if (res.status !== 200) return
callback && callback();
this.$pull(document.querySelector('#pullup'), 'up', res.data.has_next?loaded=>{
this.page ++;
this.fetchData(()=>{
loaded && loaded();
});
}:'done');
});
}
Related Packages
vue-slide-for-more
A vuejs(vue2) component for loading more data when the content was slide to the...
1,182
4
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.2.8 | ISC | ||
| 1.2.6 | ISC | ||
| 1.2.5 | ISC | ||
| 1.2.4 | ISC | ||
| 1.2.3 | ISC | ||
| 1.2.2 | ISC | ||
| 1.2.1 | ISC | ||
| 1.2.0 | ISC | ||
| 1.1.0 | ISC | ||
| 1.0.4 | ISC | ||
| 1.0.3 | ^2.0.3 | ISC | |
| 1.0.2 | ISC | ||
| 1.0.1 | ISC | ||
| 1.0.0 | ISC |