Simple pagination component for vue-3
- Vue.js (3.2.37). Required.
npm install @ahm-zobyer/vue-3-pagination
import the script:
import { v3Paginate } from "@ahm-zobyer/vue-3-pagination";
import the css:
import "@ahm-zobyer/vue-3-pagination/dist/style.css";
Register the component :
components: {
v3Paginate;
}
<v3Paginate :totalElement="100" :elementPerPage="10" @onPageClick="getData" />
Name | Type | Description |
---|---|---|
totalElement |
Number | (optional) defines total no of data present. |
elementPerPage |
Number | (optional) defines number data which will be shown on per page. |
Name | Description |
---|---|
onPageClick |
Triggered when a user changes page. Passes the new page index as a parameter. |
To work on the library locally, run the following command:
install dependencies
npm i
run on local machine
npm run dev