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

<script>
export default {
  name: "ZxTableBasis",
  props: {
    data: {
      type: Array,
      require: true,
    },
    tHeader: {
      type: Array,
      require: true,
    },
    height: {
      type: String,
      default: "80vh",
    },
    border: {
      type: Boolean,
      default: true,
    },
    stripe: {
      type: Boolean,
      default: true,
    },
  },
};
</script>

<style>
</style>