<script lang="ts" setup>
import { Card } from 'ant-design-vue'
import { BasicTable, useTable } from '@/components/Table'

const props = defineProps({
  data: {
    type: Object,
    default: () => {},
  },
})

const [registerTable] = useTable({
  dataSource: props.data.Content,
  rowKey: 'id',
  size: 'small',
  immediate: false,
  columns: props.data.Columns,
  useSearchForm: false,
  showTableSetting: false,
  showIndexColumn: false,
})
</script>

<template>
  <Card :title="props.data.Header" v-bind="$attrs">
    <!-- <template #extra>
      <a-button type="link">
        更多
      </a-button>
    </template> -->
    <BasicTable @register="registerTable" />
  </Card>
</template>

<style scoped>
::v-deep(.ant-card-body) {
  padding:5px;
}
</style>
