feat: PaginationComponent
This commit is contained in:
parent
0356160376
commit
6e64a041f0
1 changed files with 25 additions and 0 deletions
25
src/components/PaginationComponent.vue
Normal file
25
src/components/PaginationComponent.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const currentPage = defineModel<number>('currentPage', { default: 1 });
|
||||||
|
const maxPage = defineModel<number>('maxPage', { default: 1 });
|
||||||
|
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
fetchData?: (...args: unknown[]) => void;
|
||||||
|
}>(),
|
||||||
|
{},
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<q-pagination
|
||||||
|
claess="pagination"
|
||||||
|
v-model="currentPage"
|
||||||
|
:max="maxPage"
|
||||||
|
direction-links
|
||||||
|
active-color="primary"
|
||||||
|
gutter="sm"
|
||||||
|
@update:model-value="fetchData"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue