vue-pagination
Pagination component for Vue.js.
Compatibility Note : vue-pagination requires Vue.js 1.0.0+
Installation
-
Script Tag
-
NPM
I don't publish this repo on npm, you can install by github.
npm install https://github.com/luoye-fe/vue-pagination.git
Usage
-
template
-
js
{returnconfig:currentPage: 1itemsPerPage: 10pagesLength: 5totalItems: 0{};}{thisconfig {console;};};
Demo
Options
-
use options
While useing Commonjs/ES6 Module, you should exec
Vue.use(VuePagination)
, at this point you can pass options byVue.use(VuePagination, optionsObj)
.Name Type Default Required Description tagName String vue-pagination custom tag name example
;;Vue -
pagination config
vue-pagination accept props named
pagination-config.sync
, you must pass some required options, all options as follows.Name Type Default Required Description firstStr String First false First button text prevStr String Prev false Prev button text nextStr String Next false Next button text lastStr String Last false Last button text first Boolean True false Need first button or not prev Boolean True false Need prev button or not next Boolean True false Need next button or not last Boolean True false Need last button or not normal Boolean True false Need normal page list or not currentPage Number 1 false CurrentPage itemsPerPage Number 10 false Item number every page pagesLength Number 5 false Normal page list length totalItems Number 0 true Total items number (calculate numbers of page by this) onChange Function false Callback function when currentPage change