

<template>
  <div class="zt-table-footer">
    <Descriptions @register="register" />
  </div>
</template>
<script lang="ts" setup>
import { Descriptions , useDescription } from '@/components/Descriptions';
import { PropType, ref, watchEffect } from 'vue';
import { DescriptionsSchema } from '@/components/Descriptions/src/types'
defineOptions({ name: 'BasicTableFooter' })

const props = defineProps({
  summaryData: {
    type: Object,
    default: () => ({})
  },
  schema: {
    type: Array as PropType<DescriptionsSchema[]>,
    default: () => []
  }
})

const curData = ref()

watchEffect(() => {
  curData.value = props.summaryData
})

const [register] = useDescription({
  title: '汇总信息',
  column: 3,
  data: curData,
  schema: props.schema
})
</script>

<style scoped lang="scss">
</style>
