luo-infinite-scroll
v0.0.7
Published
Infinite scroll
Downloads
21
Maintainers
Readme
Luo-Infinite-Scroll
Infinite scroll
Install
npm install luo-infinite-scroll -S
Usage
import Vue from 'vue';
import LuoInfiniteScroll from "luo-infinite-scroll";
import img from '@/assets/imgs/tz-loading.gif';
Vue.use(LuoInfiniteScroll);
<div v-luo-infinite-scroll="scrollEvent" luo-infinite-scroll-distance="10" :luo-infinite-scroll-loading-path="img" :luo-infinite-scroll-wait="500">
// 列表内容
</div>
methods: {
scrollEvent (e) {
// 请求数据
e.loading = false; // 关掉login图
}
}
Props
| 参数类型 | 说明 | | ---------- | ----------- |、 | v-luo-infinite-scroll | 到达底部事件 | | luo-infinite-scroll-distance | 离底部多少距离触发事件 | | luo-infinite-scroll-loading-path | loading图片地址 | | luo-infinite-scroll-wait | 最底等待时间(默认100毫秒)|
License
This content is released under the MIT License.