Skip to content

Commit

Permalink
Merge pull request #15 from vue-bulma/develop
Browse files Browse the repository at this point in the history
upgrade to 1.1.5 add custom text of  prev/next button
  • Loading branch information
netpi authored May 4, 2017
2 parents 353d339 + 10b00ed commit 58a57f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default {
| 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 |


## Badges
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-bulma-pagination",
"version": "1.1.4",
"version": "1.1.5",
"description": "Pagination component for Vue Bulma",
"main": "src/index.js",
"peerDependencies": {
Expand Down
14 changes: 11 additions & 3 deletions src/Pagination.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<nav :class="getNavClassName()">
<router-link :class="getPreClassName()" :to="normalize(urlPrefix+'/'+(formatCurrentPage-1))" >Prev</router-link>
<router-link :class="getNextClassName()" :to="normalize(urlPrefix+'/'+(formatCurrentPage+1))">Next</router-link>
<router-link :class="getPreClassName()" :to="normalize(urlPrefix+'/'+(formatCurrentPage-1))" >{{prev}}</router-link>
<router-link :class="getNextClassName()" :to="normalize(urlPrefix+'/'+(formatCurrentPage+1))">{{next}}</router-link>
<ul class="pagination-list" >
<li v-for="item in pagingList" >
<router-link v-if="item !== '...'" :class=" getPagingClassName(item) " :to="normalize(urlPrefix+'/'+item)">{{ item }}</router-link>
Expand Down Expand Up @@ -31,7 +31,15 @@ export default {
modifiers: {
type: String,
default: ''
}
},
prev: {
type: String,
default: 'Prev'
},
next: {
type: String,
default: 'Next'
},
},
methods: {
getNavClassName () {
Expand Down

0 comments on commit 58a57f1

Please sign in to comment.