<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 NewPushForm from './new-push-form'
import PushLog from './push-log'
import PusTask from './push-task'
export default {
  name: 'MessagePush',
  components: { NewPushForm, PushLog, PusTask },
  data() {
    return {
      activeName: 'NewPushForm'
    }
  },
  computed: {
    tables() {
      return [
        {
          title: this.$t('pages.messagePush.tabs.newPush'),
          component: 'NewPushForm'
        }, {
          title: this.$t('pages.messagePush.tabs.pushLog'),
          component: 'PushLog'
        }, {
          title: this.$t('pages.messagePush.tabs.pushTask'),
          component: 'PusTask'
        }
      ]
    }
  }
}
</script>
