index.vue 859 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="p-4">
  3. <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" />
  4. </div>
  5. </template>
  6. <script lang="ts">
  7. import { defineComponent } from 'vue';
  8. import { BasicTable, useTable } from '/@/components/Table';
  9. import { getAccessStatisticsColumns } from './access.data';
  10. import { getGoafAccessCount } from '../basicInfo.api';
  11. export default defineComponent({
  12. components: { BasicTable },
  13. setup() {
  14. const [registerTable] = useTable({
  15. api: getGoafAccessCount,
  16. columns: getAccessStatisticsColumns(),
  17. pagination: true,
  18. showIndexColumn: true,
  19. });
  20. return {
  21. registerTable,
  22. };
  23. },
  24. });
  25. </script>
  26. <style scoped>
  27. /* 合计行样式优化 */
  28. .bg-gray-50 {
  29. background-color: #f9fafb;
  30. }
  31. .font-medium {
  32. font-weight: 500;
  33. }
  34. </style>