| 1234567891011121314151617181920212223242526272829303132333435 |
- <template>
- <v-pagination
- v-if="pagination.last"
- :model-value="modelValue"
- :length="pagination.last"
- rounded="circle"
- @update:model-value="onPageUpdated"
- />
- </template>
- <script setup lang="ts">
- import { defineProps, defineEmits, ComputedRef } from "vue";
- import { PropType } from "@vue/runtime-core";
- import { Pagination } from "~/types/data";
- const props = defineProps({
- modelValue: {
- type: Number,
- required: true
- },
- pagination: {
- type: Object as PropType<Pagination>,
- required: true
- }
- });
- const emit = defineEmits(['update:modelValue']);
- const onPageUpdated = (newPage: number) => {
- emit('update:modelValue', newPage);
- };
- </script>
- <style scoped lang="scss">
- </style>
|