<template>
  <div class="global">
    <div class="mainContainer">
      <div class="tab">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="公告管理" name="NewNotice" />
          <el-tab-pane label="草稿箱" name="AllNotice" />

        </el-tabs>
      </div>
      <div id="main">

        <router-view id="mainRight" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'noticeManagement',
  data() {
    return {
      activeName: 'NewNotice'
    }
  },
  mounted() {
    this.activeName = this.$route.name
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event)
      this.$router.push(tab.name)
    }
  }
}
</script>
