space-table-column.vue 672 Bytes
<script setup lang="ts">
import { Space, TableData } from '@arco-design/web-vue';
import TableColumn from '@/components/filter/table-column.vue';

withDefaults(defineProps<{ title?: string; dataIndex?: string; direction?: 'vertical' | 'horizontal' }>(), {
  direction: 'horizontal',
});
</script>

<template>
  <TableColumn v-bind="$attrs" :title="title" :data-index="dataIndex" :tooltip="false">
    <template #default="{ record, rowIndex }">
      <Space :direction="direction" fill>
        <slot name="default" :record="record as TableData" :index="rowIndex as Number" />
      </Space>
    </template>
  </TableColumn>
</template>

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