vue3-paginator
v1.0.4
Published
vue3 pagination library
Downloads
315
Readme
vue3-paginator
Library to use pagination for vue3
Installation
To install the latest version:
npm install --save vue3-paginator
Import to your components
import Vue3Paginator from "vue3-paginator";
Example:
<template>
<vue3-paginator
@change="handleChange"
/>
</template>
<script lang="ts">
import Vue3Paginator from '@/vue3-paginator.vue';
export default {
components: {
Vue3Paginator
},
methods: {
handleChange(page: string) {
console.log(`Page value is ${page}`)
},
},
};
</script>
Props
Events
Slots:
<template>
<vue3-paginator
@change="handleChange"
currentPage="2"
perPage="5"
:total="200"
>
<template v-slot:prev-button>
<div>prev</div>
</template>
<template v-slot:next-button>
<div>next</div>
</template>
</vue3-paginator>
</template>