Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

fix: Pagination Number in Nav Change is unchanged #21

Merged
merged 2 commits into from
Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/client/components/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<component
v-if="comp"
:is="comp"
v-model="page"
:value="page"
:page-count="$pagination.length"
:click-handler="clickCallback"
:prev-text="'Prev'"
Expand All @@ -16,15 +16,16 @@
export default {
data() {
return {
page: 0,
comp: null,
}
},

created() {
this.page = this.$pagination.paginationIndex + 1

computed: {
page() {
return this.$pagination.paginationIndex + 1
}
},

mounted() {
import(/* webpackChunkName: "vuejs-paginate" */ 'vuejs-paginate').then(comp => {
this.comp = comp.default
Expand Down