<template>
  <div>
    <div v-for="option in data.options">
      <span>{option.name}</span>
      <div v-for="component in option.components">
        <el-select
          v-if="component.type === 'select'"
          placeholder="请选择"
        >
          <el-option
            v-for="item in component.options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
        <el-date-picker
          v-if="component.type === 'date'"
          type="date"
          placeholder="选择日期"
        />
      </div>

    </div>
    <el-table />
  </div>
</template>

<script>
export default {
  props: {
    data: {
      options: [
        {
          name: '',
          components: [
            {
              type: 'select',
              options: [],
            },
            {
              type: 'date',
              options: [],
            },
          ],
        },
      ],
      columns: [],
    },
  },

};

</script>
