<template>
	<el-table :data="tableData" size="large" v-bind="$attrs">
		<el-table-column v-for="item in column" :key="item.prop" v-bind="item">
			<template v-if="$slots[item.prop]" #default="scope">
				<slot :name="item.prop" v-bind="scope"></slot>
			</template>
		</el-table-column>
	</el-table>
</template>

<script lang="ts" setup>
import { defineProps } from 'vue';

interface TableData {
	[propName: string]: any;
}

interface Column {
	prop: string;
	label: string;

	[propName: string]: any;
}

defineProps<{
	tableData: TableData[];
	column: Column[];
}>();
</script>
