Best and complete pagination plugin for Vue.js. Inspired in Angular Bootstrap Pagination.
npm install vuejs-uib-pagination``sh`
$ npm install vuejs-uib-pagination
Global:
`html`
CommonJS:
`javascript
var Vue = require("vue");
var pagination = require("vuejs-uib-pagination");
Vue.use(pagination);
`
ES2015:
`javascript
import * as Vue from "vue";
import pagination from "vuejs-uib-pagination";
Vue.use(pagination);
`
HTML:
`html`
Script:
`javascript`
var app = new Vue({
el: "#app",
data: {
pagination: { }
}
});
The settings are almost the same as Angular Bootstrap Pagination, there are only 3 differences:
* v-model is an object and has these keys:page-label
* currentPage
* numPages (avoid props mutation anti-patern)
* does not accept expressions, it works with functions.template-url
* is not supported.
(Default: false) - Whether to display First / Last buttons.
`html`
(Default: false) - Whether to always display the first and last page numbers. If max-size is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary. NOTE: max-size refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential.
`html`
(Default: true) - Whether to display Previous / Next buttons.
`html`
(Default: First) - Text for First button.
`html`
(Default: false) - Also displays ellipses when rotate is true and max-size is smaller than the number of pages.
`html`
(Default: 10) - Maximum number of items per page. A value less than one indicates all items on one page.
`html`
`html`
`html`
`html`
`html`
`html`
`html`
`html`
`html`
`html`
`html``