Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xtongs/vue-recyclist

Infinite scroll list for Vue.js with DOM recycling.
https://github.com/xtongs/vue-recyclist

infinite-scroll vue vue-recyclist

Last synced: 2 months ago
JSON representation

Infinite scroll list for Vue.js with DOM recycling.

Awesome Lists containing this project

README

        

# vue-recyclist (not maintained)

> Infinite scroll list for Vue.js (v2.1+) with DOM recycling.

## [Demo](https://xtongs.github.io/vue-recyclist/)

## Installation

###

``` bash
npm install -D vue-recyclist
```

## Import

``` javascript
import VueRecyclist from 'vue-recyclist'

export default {
...
components: {
VueRecyclist,
},
...
}
```

or

``` html

```

## Usage
``` html


...



...



...


Loading...


No More Data


...

import VueRecyclist from 'vue-recyclist'
export default {
data() {
...
},
components: {
'vue-recyclist': VueRecyclist
},
methods: {
loadmore() {
// Fetch more items
...
}
}
}

```

## 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

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```