<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',
        OEM_MANAGE_ID: '',
        TYPE: ''
      }
    }
  },
  methods: {
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    setOemManageId(OEM_MANAGE_ID) {
      this.parentObj.OEM_MANAGE_ID = OEM_MANAGE_ID
    },
    setType(TYPE) {
      this.parentObj.TYPE = TYPE
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setActiveName: this.setActiveName,
      setType: this.setType,
      setOemManageId: this.setOemManageId
    }
  }
}
</script>

<style scoped>

</style>
