<template>
  <el-table
    :data="tableData"
    stripe
    fit
    border
    highlight-current-row
    :cell-style="{ textAlign: 'center' }"
    :header-cell-style="{
      textAlign: 'center',
      color: '#000',
    }"
    :height="height"
  >
    <template v-for="(item, index) in tHeader">
      <el-table-column
        :label="item.label"
        :prop="item.prop"
        :key="item.id ? item.id : index"
        :sortable="item.sortable ? item.sortable : false"
        :fixed="item.fixed ? item.fixed : null"
      />
    </template>
  </el-table>
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      require: true,
    },
    tHeader: {
      type: Array,
      require: true,
    },
    height: {
      default: "80vh",
    },
  },

  data() {
    return {};
  },
};
</script>

<style>
</style>