vue-loadmore-refresh
v1.0.9
Published
A Vue.js project
Downloads
2
Readme
vue-loadmore
A Vue.js project 测试阶段, 请勿下载
Installation
$ npm install vue-loadmore-refresh
Usage
//ES6
import vueLoadmore from 'vue-loadmore-refresh'
//require
var vueLoadmore = require('vueLoadmore')
Vue.use(vueLoadmore)
// 作为组件的方式使用
<vue-loadmore></vue-loadmore>
Example
<vue-loadmore :text-size="40" :loading-size="100" :if-use-pull-down="true" :if-use-pull-up="true" @refresh-data="refreshData" @load-more-data="loadmoreData" ref="more">
<ul>
<li v-for="(list, index) in content" :key="index">
{{ list }}
</li>
</ul>
</vue-loadmore>
</script>
Methods
refreshData(){
.../load more data
vm.$refs.more.pullDownLoaded(); //数据调用完成, 触发子组件事件
},
loadmoreData(){
.../load more data
vm.$refs.more.pullUploaded(); //数据调用完成, 触发子组件事件
}
For detailed explanation on how things work, consult the docs for vue-loader.