<template>
  <div class="p-4">
    <!-- 表格：适配多列，设置横向滚动 & 边框 -->
    <BasicTable 
      @register="registerTable" 
      bordered 
      :scroll="{ x: 'max-content' }" 
      class="closed-statistics-table"
    />
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable } from '/@/components/Table';
import { getClosedStatisticsColumns } from './closed.data';
// 引入接口（后续替换为真实接口）
import { getClosedAccessCount } from '../basicInfo.api';

export default defineComponent({
  components: { BasicTable },
  setup() {
    // 注册表格
    const [registerTable] = useTable({
      api: getClosedAccessCount, // 密闭统计接口
      columns: getClosedStatisticsColumns(),
      pagination: true, // 无分页
      showIndexColumn: false, // 关闭默认序号列，使用自定义序号列
    });

    return {
      registerTable,
    };
  },
});
</script>

<style scoped>

</style>