1.0.2 • Published 4 years ago

vue-paginate-scroll v1.0.2

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

vue-paginate-scroll

Vue component that handles "infinite scroll"

npm install vue-paginate-scroll

➡➡Example here

Install as global component

  //index.js
 
  import Vue from "vue";
  import VuePaginateScroll from "vue-paginate-scroll";
  
  Vue.component('vue-paginate-scroll', VuePaginateScroll);
  
  new Vue({
   //...
  });

Install as local component

  <script>
  import VuePaginateScroll from "vue-paginate-scroll";
  
  export default {
    ...
    components: { VuePaginateScroll }
    ...
  }
  </script>

Props

src: type: Array, required. Data to use as source.

perScroll: type: Number, default: 10. Define how many items to show per scroll

observerOptions: type: Object, default: {threshold: .75}. IntersectionObserver options

Slots

default: use this to get the data to display. Data exposed { data, currentScroll, lastScroll }