jws-frontend/src/components/PaginationComponent.vue

29 lines
570 B
Vue
Raw Normal View History

2024-07-01 11:44:20 +07:00
<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
v-model="currentPage"
text-color="primary"
2024-07-01 11:44:20 +07:00
:max="maxPage"
direction-links
active-color="grey-8"
active-design="outline"
2024-07-01 11:44:20 +07:00
gutter="sm"
2024-10-16 16:46:46 +07:00
boundary-numbers
2024-10-30 09:50:40 +07:00
:max-pages="4"
2024-07-01 11:44:20 +07:00
@update:model-value="fetchData"
/>
</template>
<style scoped></style>