<template>
  <div class="app-container">
    <el-tabs v-model="activeName">
      <el-tab-pane v-for="item in tables" :key="item.name" :label="item.title" :name="item.component" />
      <component :is="activeName" />
    </el-tabs>
  </div>
</template>
<script>
import EggExchangeRecord from './egg-exchange-record'
import EggLotteryRecord from './egg-lottery-record'
import EggLotteryCnf from './egg-lottery-cnf'
export default {
  name: 'GameEgg',
  components: { EggExchangeRecord, EggLotteryRecord, EggLotteryCnf },
  data() {
    return {
      activeName: 'EggExchangeRecord'
    }
  },
  computed: {
    tables() {
      return [
        {
          title: this.$t('pages.gameEgg.tabs.exchangeRecord'),
          component: 'EggExchangeRecord'
        }, {
          title: this.$t('pages.gameEgg.tabs.lotteryRecord'),
          component: 'EggLotteryRecord'
        },
        {
          title: this.$t('pages.gameEgg.tabs.config'),
          component: 'EggLotteryCnf'
        }
      ]
    }
  }
}
</script>
