41 lines
906 B
Vue
41 lines
906 B
Vue
<script setup lang="ts">
|
|
// Components
|
|
import PaginationView from '~/components/pub/my-ui/pagination/pagination-view.vue'
|
|
|
|
// Types
|
|
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
|
|
|
// Configs
|
|
import { cols, funcComponent, funcHtml, funcParsed, header, keys } from './list-cfg'
|
|
|
|
interface Props {
|
|
data: any[]
|
|
paginationMeta: PaginationMeta
|
|
}
|
|
|
|
defineProps<Props>()
|
|
|
|
const emit = defineEmits<{
|
|
pageChange: [page: number]
|
|
}>()
|
|
|
|
function handlePageChange(page: number) {
|
|
emit('pageChange', page)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="space-y-4">
|
|
<PubMyUiDataTable
|
|
:rows="data"
|
|
:cols="cols"
|
|
:header="header"
|
|
:keys="keys"
|
|
:func-parsed="funcParsed"
|
|
:func-html="funcHtml"
|
|
:func-component="funcComponent"
|
|
/>
|
|
<PaginationView :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
</div>
|
|
</template>
|