<template>
  <component :is="parentObj.activeName"/>
</template>

<script>
import List from './components/List'
import Add from './components/add'
export default {
  components: {
    List,
    Add
  },
  data() {
    return {
      parentObj: {
        activeName: 'List',
        TYPE: '',
        CORPINFO_ID: ''
      }
    }
  },
  methods: {
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    setType(TYPE) {
      this.parentObj.TYPE = TYPE
    },
    setCorpInfoId(CORPINFO_ID) {
      this.parentObj.CORPINFO_ID = CORPINFO_ID
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setActiveName: this.setActiveName,
      setType: this.setType,
      setCorpInfoId: this.setCorpInfoId
    }
  }
}
</script>

<style scoped>

</style>
