Package Exports
- v-pagination
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (v-pagination) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Vue Pagination
Simple, generic and non-intrusive pagination component for Vue.js. Presentation is based on bootstrap.
Dependencies
- Vue.js (>=1.0). Required.
- Bootstrap (CSS). Optional.
Installation
Option 1
Compile the code using browserify with the stringify transform
npm install vue-paginationRequire the script:
var VuePagination = require('vue-pagination');Option 2
Import the compiled standalone file into your HTML, which will expose a global VueTables variable.
Usage
Register the component(s)
Vue.use(VuePagination)HTML:
<pagination for="some-entity" :records="500"></pagination>props:
forstringrequiredunique identifier for the component instance.recordsnumberrequirednumber of recordsper-pagenumberoptionalrecords per page. Default: 25chunknumberoptionalmax pages per chunk. Default: 10count-textstringoptionaltotal records text. Default: '{count} records'
When a page is selected an event will be dispatched, using the unique id for the component. Listen to it and respond accordingly:
this.$on('vue-pagination::some-entity', function(page) {
// display the relevant records using the page param
});