vue-recyclist
Infinite scroll list for Vue.js (v2.1+) with DOM recycling.
Demo
Installation
npm install -D vue-recyclist
Import
...components:VueRecyclist...
or
Usage
...<!-- tombstone slot -->...<!-- item slot -->...<!-- loading spinner -->Loading...<!-- end of list -->No More Data...
Options
Directive | Type | Default | |
---|---|---|---|
list | Array | required | List of items |
tombstone | Boolean | false | Whether to show tombstones |
size | Number | 10 | The number of items added each time |
offset | Number | 200 | The number of pixels of additional length to allow scrolling to |
loadmore | Function | required | The function of loading more items |
spinner | Boolean | true | Whether to show loading spinner |
nomore | Boolean | false | Whether to show 'no more data' status bar |
Development
# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build