<template>
  <div class="app-container">
    <el-tabs v-model="activeName">
      <el-tab-pane v-for="item in tables" :key="item.component" :label="$t(item.titleKey)" :name="item.component" />
      <component :is="activeName" />
    </el-tabs>
  </div>
</template>
<script>
import ConfigLevel from './config-level'
import ConfigCreateRole from './config-create-role'
import ConfigRewardRole from './config-weekly-reward'
export default {
  name: 'FamilyConfig',
  components: { ConfigLevel, ConfigCreateRole, ConfigRewardRole },
  data() {
    return {
      activeName: 'ConfigLevel',
      tables: [
        {
          titleKey: 'pages.familyConfig.tabs.level',
          component: 'ConfigLevel'
        }, {
          titleKey: 'pages.familyConfig.tabs.createRule',
          component: 'ConfigCreateRole'
        }, {
          titleKey: 'pages.familyConfig.tabs.weeklyReward',
          component: 'ConfigRewardRole'
        }
      ]
    }
  }
}
</script>
