<template>
  <div class="menuList-wrap" style="height:100%;">
    <el-scrollbar class="live-scrollbar">
      <el-menu
        router
        :default-active="$route.path"
        class="el-menu-vertical-demo"
        background-color="#F4F5F8"
        text-color="#797979"
        active-text-color="#fff">

        <Menu-item :routes="routes"></Menu-item>
      </el-menu>
    </el-scrollbar>
  </div>



</template>

<script>
  import MenuItem from "@/page/Layout/menuList/menuItem"

  export default {
    name: "menuList",
    components: {
      MenuItem,
    },
    computed: {
      routes() {
        // 拿到业务管理数据
        const myroutes = JSON.parse(sessionStorage.getItem('leftMenuList'))
        console.log('左側左側',myroutes)
        return myroutes
      }
    },

    methods: {
      handleOpen(key, keyPath) {
        // console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        // console.log(key, keyPath);
      }
    }
  }
</script>

<style scoped>
.menuList-wrap {
height: 500px;
}
.live-scrollbar {
  height: 100%;
}
.el-scrollbar /deep/ .el-scrollbar__wrap{ overflow-x: hidden;}
.el-scrollbar /deep/ .is-horizontal {
  display: none;
}
</style>
