Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vue-bulma/pagination


https://github.com/vue-bulma/pagination

bulma pagination vue vue-component vue-components

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Pagination

Pagination component for Vue Bulma.

## Installation

```sh
$ npm install vue-bulma-pagination --save
# or
$ yarn add vue-bulma-pagination --save
```

## Examples

```vue



import Pagination from 'vue-bulma-pagination/src/Pagination'

export default {
components: {
Pagination
}
}

```
## Document

| props | required | default | optional | desc |
| ----------- | -------- | --------------------------| --------------------------- | -------------------------------- |
| urlPrefix | `false` | '/' | | urlPrefix for vue-router |
| urlBuilder | `false` | [urlBuilder](#urlbuilderpagenum) | | urlBuilder result will passed to vue-router link `to` prop |
| currentPage | `true` | 1 | | |
| lastPage | `true` | | | the last page number |
| displayPage | `false` | 4 | | page number will to be displayed |
| modifiers | `false` | '' | '','is-centered','is-right' | |
| prev | `false` | 'Prev' | | text of `prev` button |
| next | `false` | 'Next' | | text of `next` button |

### urlBuilder(pageNum)
Returned value will be passed to `router-link` as `:to` prop. See example below:
```vue



import Pagination from 'vue-bulma-pagination/src/Pagination'

export default {
components: {
Pagination
},

methods: {
urlBuilder (page) {
return { query: { ...this.$route.query, page } } // Changing page in location query
}
}
}

```

## Badges

![](https://img.shields.io/badge/license-MIT-blue.svg)
![](https://img.shields.io/badge/status-dev-yellow.svg)

---