<template>
  <div>
    <el-table-column v-if="data.children" :label="data.key" align="center">
      <table-column
        v-for="(child, i) of data.children"
        :key="i"
        :data="child"
        :prefix="prefix + '--' + child.key"
      ></table-column>
    </el-table-column>
    <el-table-column
      v-else
      :label="data.key"
      :prop="prefix"
      align="center"
    ></el-table-column>
  </div>
</template>
<script>
export default {
  name: "table-column",
  props: { data: Object, prefix: String },
};
</script>
<style lang="scss">
</style>