<template>
  <div class="sidebar-container"
       :class="{'is-active':isCollapse}">
    <logo :isCollapse="isCollapse"></logo>
    <el-menu unique-opened
             :default-active="nowTagValue"
             mode="vertical"
             :show-timeout="200"
             background-color="#00142a"
             text-color="hsla(0,0%,100%,.65)"
             active-text-color="#409eff"
             :collapse="isCollapse">
      <sidebar-item :menu="menu"
                    :isCollapse="isCollapse"></sidebar-item>
    </el-menu>
  </div>
</template>

<script>
import MENU from '@/mock/menu'
import { mapGetters } from 'vuex'
import SidebarItem from './sidebarItem'
import logo from './logo'
export default {
  name: 'sidebar',
  components: { SidebarItem, logo },
  data () {
    return {}
  },
  created () {
    this.$store.dispatch('GetMenu').then(data => { })
  },
  computed: {
    ...mapGetters(['menu', 'tag', 'isCollapse']),
    nowTagValue: function () { return this.$router.$avueRouter.getValue(this.$route) }
  },
  mounted () { },
  methods: {}
}
</script>
<style lang="scss" scoped>
</style>

