<template>
  <div>
    <List v-if="activeName=='List'" ref="list"/>
    <Question v-if="activeName=='Question'" />
    <Edit v-if="activeName=='Edit'" />
    <Info v-if="activeName=='Info'" />
    <Complete v-if="activeName=='Complete'" />
  </div>
</template>
<script>
import List from './components/list'
import Question from '../question/index'
import Edit from './components/edit'
import Info from './components/info'
import Complete from './components/complete'
export default {
  components: {
    List: List,
    Question: Question,
    Edit: Edit,
    Info: Info,
    Complete: Complete
  },
  data() {
    return {
      activeName: 'List',
      COURSEWAREID: '',
      COURSEWARETYPE: '',
      listQueryForm: {}
    }
  },
  watch: {
    'activeName': {
      handler(newVar, oldVar) {
        if (newVar == 'List') {
          // this.$refs.list.goKeyReset()
          this.activeName = 'List'
        }
      }
    }
  }

}
</script>

<style scoped>
</style>
