Skip to content

Commit 81e14ef

Browse files
authored
Update Pagination.vue
1 parent 020121f commit 81e14ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Pagination.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
pagination_data: function(){
4141
const t = this;
4242
43-
if(typeof t.pagination_data.current_page === 'number'){
43+
if(typeof t.pagination_data.current_page === 'number' && t.currentPage !== t.pagination_data.current_page){
4444
t.$emit('update:pagination_goto', t.pagination_data.current_page);
45+
t.currentPage = t.pagination_data.current_page;
4546
} else {
4647
t.$emit('update:pagination_goto', false);
4748
}
@@ -51,6 +52,12 @@
5152
goto(page){
5253
this.$emit('update:pagination_goto', page);
5354
}
55+
},
56+
data() {
57+
return {
58+
currentPage: 1
59+
};
5460
}
5561
}
5662
</script>
63+

0 commit comments

Comments
 (0)