vuejs-paginator

A Vue.js plugin to easily integrate pagination.
13,897 283
Install
npm install vuejs-paginator
Latest Version:2.0.2
Vue:2
Older releases:1
License:MIT
Last Updated:Sep 20, 2018
Links: GitHub  ·  npm
Maintainer: hootlex

Vue.js Paginator CircleCI npm downloads Software License

A Vue.js plugin to easily integrate pagination in your projects.

VueJs Paginator is a simple but powerful plugin since it gives you access on how to render the data, instead of using a predefined table.

vue paginator preview

The way you use it is similar to Laravel's paginator.

Installation

For Vue 1.* use v1.0.15.

Through npm

npm install vuejs-paginator --save

From a cdn

<script src="https://cdnjs.cloudflare.com/ajax/libs/vuejs-paginator/2.0.0/vuejs-paginator.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/vuejs-paginator/2.0.0/vuejs-paginator.min.js"></script>

Usage

Use VPaginator in the HTML.

<v-paginator resource_url="api/animals" @update="updateResource"></v-paginator>

Prepare the Vue instance.

// if you are not using the cdn version you have to import VuePaginator.
// import VuePaginator from 'vuejs-paginator'
new Vue({
    data () {
      return {
        animals: []
      }
    },
    components: {
        VPaginator: VuePaginator
    },
    methods: {
      updateResource(data){
        this.animals = data
      }
    }
  ...
});

Thats it

Every time a page is changed or fetched, resource variable will contain the returned data.

<ul>
  <li v-for="animal in animals">
    {{ animal.name }}
  </li>
</ul>

Documentation

Here you can find the detailed Documentation

Build Setup

# install dependencies
npm install

# build for production with minification
npm run build

# run unit tests
npm run unit
# run all tests
npm test

Related Packages

@alkeincodes/vuejs-pagination

a simple pagination component made for VueJS

849 2
vuejs-paginate

A simple pagination component for Vue.js

1,264,788 765
vue-pagination-2

Vue.js 2 pagination component

1,088,836 186
v-pagination-3

Vue.js 3 pagination component

823,217 186
vuejs-paginate-next

A simple Vue3 pagination component.

795,954 43

Version History

Version Released License
2.0.2 MIT
2.0.1 MIT
2.0.0 MIT
1.0.15 MIT
1.0.14 MIT