<template>
  <el-scrollbar wrap-class="scrollbar-wrapper">
    <el-menu
      :show-timeout="200"
      :default-active="$route.path"
      :collapse="isCollapse"
      mode="vertical" 
      background-color="#fff"
      text-color="#34383D"
      active-text-color="#20B6EB"
    >
      <sidebar-item v-for="route in permission_routers" :key="route.path" :item="route" :base-path="route.path" />
    </el-menu>
  </el-scrollbar>
</template>

<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'

export default {
  components: { SidebarItem },
  computed: {
    ...mapGetters([
      'permission_routers',
      'sidebar'
    ]),
    isCollapse() {
      return !this.sidebar.opened
    }
  }
}
</script>
<style scoped>
#app .sidebar-container >>> .is-active.submenu-title-noDropdown{
 background: #E5F8FF!important;
  border-left:4px solid #20B6EB;
}
#app .sidebar-container >>> .is-active>.el-submenu__title{
 background: #E5F8FF!important;
  border-left:4px solid #20B6EB;
}
 /* #app .sidebar-container  >>> .el-submenu  .el-menu-item.is-active{
  background: #E5F8FF!important;
  border-left:4px solid #20B6EB;
} */
</style> 