pagination-buma
v1.0.6
Published
## Usage Component
Downloads
10
Readme
pagination-buma
Usage Component
npm i pagination-buma
In Main.js
import Pagination from 'pagination-buma'
import '../node_modules/pagination-buma/dist/style.css'
const app = createApp(App)
app.use(Pagination)
app.mount('#app')
Test Component
<script setup>
const pagination = {
total: 10,
perPage: 10,
currentPage: 1,
};
const handle = async(page) => {
pagination.currentPage = page;
};
</script>
<template>
<div class="w-full h-screen flex items-center justify-center">
<Pagination
:total="pagination.total"
:perPage="pagination.perPage"
:currentPage="pagination.currentPage"
@update:currentPage="handle"
/>
</div>
</template>