<template>
  <div class='sidebar'>
    <div class="sidebar-title">信息公告</div>
    <el-col :span="12">
      <el-menu :default-active="this.$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
        router>
        <el-menu-item index="/message/news">
          <i class="el-icon-menu"></i>
          <span slot="title">新闻资讯</span>
        </el-menu-item>
        <el-menu-item index="/message/law">
          <i class="el-icon-menu"></i>
          <span slot="title">法律法规</span>
        </el-menu-item>
        <el-menu-item index="/message/dynamic">
          <i class="el-icon-document"></i>
          <span slot="title">平台动态</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </div>
</template>

<script>
  export default {
    data() {
      return {

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

<style scoped>
  .sidebar {
    width: 2.4rem;
    border: 1px solid rgba(219, 219, 219, 1);
  }

  .el-menu {
    border-right: none;
  }

  .sidebar>.sidebar-title {
    width: 2.4rem;
    height: .60rem;
    line-height: .6rem;
    background: rgba(245, 246, 247, 1);
    text-align: center;
    font-size: .20rem;
    color: rgba(0, 0, 0, 1);
    font-weight: bold;
  }
  .el-col-12 {
    width: 100%;
  }
</style>
