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

<script>
import List from './components/List'
import addStudents from './components/addStudents'
import InformationChange from './components/InformationChange'
export default {
  components: {
    List,
    addStudents,
    InformationChange
  },
  data() {
    return {
      parentObj: {
        activeName: 'List',
        USER_ID: '',
        InformationChangeLocation: ''
      }
    }
  },
  methods: {
    setActiveName(activeName) {
      this.parentObj.activeName = activeName
    },
    setUSER_ID(USER_ID) {
      this.parentObj.USER_ID = USER_ID
    },
    setInformationChangeLocation(InformationChangeLocation) {
      this.parentObj.InformationChangeLocation = InformationChangeLocation
    }
  },
  provide() {
    return {
      parentObj: this.parentObj,
      setActiveName: this.setActiveName,
      setUSER_ID: this.setUSER_ID,
      setInformationChangeLocation: this.setInformationChangeLocation
    }
  }
}
</script>

<style scoped>

</style>
