<template>
  <div>
    <List v-show="activeName=='List'" ref="list"/>
    <Info v-if="activeName=='Info'" />
    <Edit v-if="activeName=='Edit'" />
    <EditCur v-if="activeName=='EditCur'" />
    <Inherit v-if="activeName=='Inherit'" />
    <CompleteEdit v-if="activeName=='CompleteEdit'" />
    <CompleteVideo v-if="activeName=='CompleteVideo'" />
  </div>
</template>
<script>
import List from './components/list'
import Question from '../question/index'
import PaperInfo from '../paper/components/info'
import Info from './components/info'
import Edit from './components/edit'
import EditCur from './components/editCur.vue'
import Inherit from './components/inherit'
import CompleteEdit from './components/completeEdit'
import CompleteVideo from './components/completeVideo'

export default {
  components: {
    CompleteEdit,
    CompleteVideo,
    Inherit,
    EditCur,
    List, Question, PaperInfo, Info, Edit
  },
  data() {
    return {
      activeName: 'List',
      COURSEWAREID: '',
      COURSEWARETYPE: '',
      CURRICULUM_ID: ''
    }
  },
  watch: {
    'activeName': {
      handler(newVar, oldVar) {
        if (newVar == 'refreshList') {
          this.$refs.list.goKeyReset()
          this.activeName = 'List'
        }
      }
    }
  }
}
</script>

<style scoped>

</style>
