Vuepagify
🍉 Pagination component for Vue.js
# Installation
npm i vuepagify
# Usage
First, you need to register component globally
import PaginationComponent from "vuepagify"
Vue.use(PaginationComponent)
Then use it in your template:
<template>
<!--Your code-->
<v-pagination pages-amount="5" @change="handlePaging"/>
</template>
<script>
export default {
methods: {
async handlePaging(page) {
await this.$router.replace({
name: this.$route.name,
query: { page: page },
}).catch(() => {})
// ...
}
}
}
</script>
For further information check API