<template>
  <div class="my-table">
    <el-table :data="data" :span-method="spanMethod">
      <custom-column v-for="(item,index) in col" :key="index" :col="item" />
    </el-table>
  </div>
</template>

<script>
import CustomColumn from './column'
export default {
  components: {
    CustomColumn
  },
  props: {
    col: {
      type: Array,
      required: true,
      default: () => { return [] }
    },
    data: {
      type: Array,
      required: true,
      default: () => { return [] }
    },
    spanMethod: {
      type: Function,
      required: false,
      default: function() { }
    }
  }
}
</script>
<style scoped>
</style>
