修复admin卡密统计GORM累积条件问题、data-table传递server-pagination
This commit is contained in:
@@ -19,6 +19,7 @@ const props = defineProps<Omit<DataTableProps<Card>, 'columns'> & {
|
||||
onToggleStatus: (row: Card) => void
|
||||
onDelete: (row: Card) => void
|
||||
searchFilter?: string
|
||||
serverPagination?: DataTableProps<Card>['serverPagination']
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -45,6 +46,7 @@ const table = generateVueTable<Card>({
|
||||
get data() { return props.data },
|
||||
get loading() { return props.loading },
|
||||
columns: columns.value,
|
||||
serverPagination: props.serverPagination,
|
||||
})
|
||||
|
||||
const columnLabels: Record<string, string> = {
|
||||
@@ -67,7 +69,7 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DataTable :columns="columns" :data :loading :table @refresh="emit('refresh')">
|
||||
<DataTable :columns="columns" :data :loading :table :server-pagination @refresh="emit('refresh')">
|
||||
<template #toolbar>
|
||||
<div class="space-y-3">
|
||||
<div class="flex items-center justify-end">
|
||||
|
||||
Reference in New Issue
Block a user