<template>
  <div>
    <CorpList v-show="activeName=='CorpList'" ref="CorpList" />
    <CorpEdit v-if="activeName=='CorpEdit'"/>
    <CorpView v-if="activeName=='CorpView'"/>
  </div>
</template>
<script>
import CorpEdit from './components/corpEdit'
import CorpList from './components/corpList'
import CorpView from './components/corpView'
export default {
  components: {
    CorpEdit: CorpEdit,
    CorpList: CorpList,
    CorpView: CorpView
  },
  data() {
    return {
      activeName: 'CorpList',
      CORPINFO_ID: ''
    }
  },
  watch: {
    'activeName': {
      handler(newVar, oldVar) {
        if (newVar == 'refreshCorpList') {
          this.$refs.CorpList.goKeyReset()
          this.activeName = 'CorpList'
        }
      }
    }
  }
}
</script>

<style scoped>
</style>

