https://github.com/ybrusentsov/vue-pagination-simple
simple vue pagination module
https://github.com/ybrusentsov/vue-pagination-simple
vue-components vue-pagination
Last synced: 2 months ago
JSON representation
simple vue pagination module
- Host: GitHub
- URL: https://github.com/ybrusentsov/vue-pagination-simple
- Owner: ybrusentsov
- License: mit
- Created: 2018-01-27T16:14:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-28T19:05:44.000Z (over 8 years ago)
- Last Synced: 2026-03-28T00:22:49.745Z (3 months ago)
- Topics: vue-components, vue-pagination
- Language: Vue
- Homepage: https://www.npmjs.com/package/vue-pagination-simple
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vue-pagination-simple
=============
Simple pagination vue component
## Installation
---------------
### npm
``` sh
npm install --save vue-pagination-simple
```
## Usage
---------------
```html
export default {
name: 'app',
data () {
return {
currentPage: 6,
totalPages: 10,
pageRange: 2
}
},
methods: {
changePage(page) {
console.log(`page changed on ${page}`);
this.currentPage = page;
}
}
}
// you can add style of pagination hover and border by class .pagination
.pagination a:hover:not(.active) {
background-color: #ddd;
}
.pagination a {
border: 1px solid #ddd;
}
.center {
display: flex;
justify-content: center;
}
```
## Example
---------------
