修复admin卡密统计GORM累积条件问题、data-table传递server-pagination

This commit is contained in:
2026-05-10 05:44:16 +08:00
parent ba7b6015eb
commit f198ae268e
2 changed files with 19 additions and 20 deletions
@@ -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">