Skip to content

Instantly share code, notes, and snippets.

@Gkiokan
Created February 6, 2023 13:40
Show Gist options
  • Save Gkiokan/f6c3c05fa6b0224ef86bf7df0c2be457 to your computer and use it in GitHub Desktop.
Save Gkiokan/f6c3c05fa6b0224ef86bf7df0c2be457 to your computer and use it in GitHub Desktop.
Vue Paginate Mixing Component
export default {
data(){ return {
currentPage: 1,
perPage: 50,
data: null,
}},
computed: {
items(){
return this.data ? this.data.data : []
}
},
watch: {
currentPage(i){
this.load(i)
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment