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

Commit 6fae794

Browse files
tolkingbillyyyyy3320
authored andcommitted
fix: Pagination Number in Nav Change is unchanged (#21)
* fix: Pagination Numbers in Nav Change is unchanged * fix: Pagination Number by computed
1 parent 303c619 commit 6fae794

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: src/client/components/Pagination.vue

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<component
33
v-if="comp"
44
:is="comp"
5-
v-model="page"
5+
:value="page"
66
:page-count="$pagination.length"
77
:click-handler="clickCallback"
88
:prev-text="'Prev'"
@@ -16,15 +16,16 @@
1616
export default {
1717
data() {
1818
return {
19-
page: 0,
2019
comp: null,
2120
}
2221
},
23-
24-
created() {
25-
this.page = this.$pagination.paginationIndex + 1
22+
23+
computed: {
24+
page() {
25+
return this.$pagination.paginationIndex + 1
26+
}
2627
},
27-
28+
2829
mounted() {
2930
import(/* webpackChunkName: "vuejs-paginate" */ 'vuejs-paginate').then(comp => {
3031
this.comp = comp.default

0 commit comments

Comments
 (0)