一个 Vue.js(v2.x+) 组件,用于创建分页。
A Vue.js(v2.x+) component to make pagination. Inspired by react-paginate.
Easy to use by providing simple api. And you can customize the style of this component by css.
Install the npm package.
$ npm install vuejs-paginate --saveRegister the component.
var Paginate = require('vuejs-paginate')
Vue.component('paginate', Paginate)import Paginate from 'vuejs-paginate'
Vue.component('paginate', Paginate)Note: For version
### Value Binding
Use `v-model` to set the selected page number. You can programmatically modify the current page by using this.
```html
Must use kebab-case for props in pure HTML.
Example
JavaScript
Vue.component('paginate', VuejsPaginate)
new Vue({
el: '#app',
methods: {
clickCallback: function(pageNum) {
console.log(pageNum)
}
}
})HTML
…
html
Changed previous button
Changed next button
You can see the demo for quickly understand how to use this package.
$ git clone [email protected]:lokyoung/vuejs-paginate.git
$ cd vuejs-paginate
$ npm install
$ npm run demoCheck the code from ./demo/index.html and ./demo/App.vue.
暂无开放 Issues,或尚未同步最近议题。