v-pc-pagination
v1.0.3
Published
A vue pagination component for pc.
Downloads
3
Readme
vue-pagination
基于 Vue 的PC端分页组件
How to use
npm i -S v-pc-pagination
Global regisiter
import Vue from 'vue'
import VuePagination from 'v-pc-pagination'
Vue.use(VuePagination)
OR in component
import VuePagination from 'v-pc-pagination'
// in vue component
export default {
components: { VuePagination },
methods: {
pageChange (page) {
console.log(page);
}
}
}
<vue-pagination :total="total" @change="pageChange"></vue-pagination>
Props
| name | type | desc | default | | ------- | ------- | ---------------------------------------- | ------- | | total | Number | Total page number | required | | current | Number | Current page number | 1 | | show | Number | Display Page number: odd number and >= 5 | 5 |
Event
| name | params | desc | | ------- | ------ | --------------------------------- | | @change | index | The page index which user clicked |