<template>
  <which-element custom :data="data" :type="type" :prop="prop" :model="model">
    <div slot-scope="{itemData, itemModel}">
      <custom-list :data="itemData" :mode="itemModel" />
    </div>
    <div slot="setting" slot-scope="{itemData, itemModel}">
      <custom-list is-setting :data="itemData" :mode="itemModel" />
    </div>
  </which-element>
</template>
<script>
import CustomList from './list.vue'
export default {
  name: 'CustomWhichComponent',
  components: {
    CustomList
  },
  props: {
    data: {
      type: Object,
      required: true
    },
    type: {
      type: String,
      default: 'MakeForm'
    },
    prop: {
      type: String,
      default: ''
    },
    model: {
      type: [Object, null],
      default: null
    }
  }
}
</script>
