Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magicianshiro/vue-simple-pagination
一个关于vue的分页插件
https://github.com/magicianshiro/vue-simple-pagination
pagination vue-pagination
Last synced: about 1 month ago
JSON representation
一个关于vue的分页插件
- Host: GitHub
- URL: https://github.com/magicianshiro/vue-simple-pagination
- Owner: magicianShiro
- License: mit
- Created: 2017-06-22T13:57:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-28T07:13:35.000Z (about 6 years ago)
- Last Synced: 2024-12-12T00:11:56.263Z (about 2 months ago)
- Topics: pagination, vue-pagination
- Language: Vue
- Homepage: https://magicianshiro.github.io/vue-simple-pagination/
- Size: 212 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 开始
## 安装
`npm i --save ms-vue-simple-pagination`
## 初始化
``` javascript
import Vue form 'vue'
import Pagination from 'ms-vue-simple-pagination'
Vue.use(Pagination)
```## 使用
``` vue
```
## 属性
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| ------------ | -------------------------------- | ------- | ---------------------- | ---------------------- |
| theme | 主题 | String | default/select | default |
| page | 当前的页数 | Number | | 1 |
| basePage | 从第几页开始页码不从第一页显示 | Number | | 4 |
| totalPage | 总页数(传了此参数,不用传pageSize&pageCount) | Number | | |
| pageSize | 一页显示多少条数据(必须配合pageCount) | Number | | |
| pageCount | 一共多少条数据(必须配合pageSize) | Number | | |
| visiblePages | 插件上显示多少个页码 | Number | | 5 |
| fast | 是否开启快进模式 | Boolean | true/false | true |
| fastStep | 快进的页数 | Number | | 5 |
| btnText | 按钮的文字内容 | Object | {first,prev,next,last} | {first,prev,next,last} |## 事件
| 事件名称 | 说明 | 回调参数 |
| -------------- | ----------------- | --------------- |
| current-change | currentPage改变时会触发 | 当前页 currentPage |