<template>
  <table class="uif-t-body">
    <u-colgroup ref="colgroup" :columns="columns"></u-colgroup>
    <tbody>
    <table-line v-for="(data, index) in dataList" :key="index" :columns="columns"
                :data="data" :index="index" :class-index="classIndex" v-on="$listeners"></table-line>
    </tbody>
  </table>
</template>

<script>
import UColgroup from '../colgroup'
import TableLine from './line'

export default {
  components: {
    UColgroup,
    TableLine
  },
  props: {
    columns: {
      type: Array,
      default () {
        return []
      }
    },
    dataList: {
      type: Array,
      default () {
        return []
      }
    },
    // 列表样式（下标）
    classIndex: {
      type: Object,
      default () {
        return {}
      }
    }
  }
}
</script>
