v-infinite-scroll
Bidirectional infinite-scroll component for Vue.js
Installation
Using yarn
yarn add v-infinite-scroll
Using npm
npm i --save v-infinite-scroll
Demo
Usage
Bundler (Webpack, Rollup)
// You need a specific loader for CSS files like https://github.com/webpack/css-loader Vue
Browser
<!-- Include after Vue -->
Example
{{item}} // Your content
Properties
Name | Type | Required | Default value | Info |
---|---|---|---|---|
loading | Boolean | No | Must be true if data is being loaded | |
offset | Number | No | 0 | Distance of top or bottom to emit the events |
onTopScrollsToBottom | Boolean | No | True | When using bidirectional scroll, automatically scrolls to the bottom after load a previous page |
Events
Name | Info |
---|---|
top | Triggered after the scroll arrives at the top |
bottom | Triggered after the scroll arrives at the bottom |
Author
License
This project is licensed under MIT License