<template>
  <el-menu
     @mouseenter.native="open_o"
     @mouseleave.native="close_s"
    default-active="1"
    class="el-menu-vertical-demo"
    @open="handleOpen"
    @close="handleClose"
    :collapse="Boolean(isCollapse)"
    :collapse-transition="false"
    unique-opened="true"
    mode="vertical"
    background-color="#545c64"
    text-color="#fff"
  >
  <div>
    <el-menu-item index="0" >
      <i class="el-icon-s-operation"></i>
    </el-menu-item>

    <el-menu-item index="0" >
      <i class="el-icon-s-operation"></i>
    </el-menu-item>

    <el-menu-item index="0" >
      <i class="el-icon-s-operation"></i>
    </el-menu-item>
    </div>
  </el-menu>
</template>

<script>
import { mapMutations , mapGetters} from "vuex";
export default {
  data() {
    return {
      isCollapse: "asa",
    };
  },
  created() {},
  methods: {
    ...mapMutations(["changeZ","changeY"]),
    
    close_s(){
      console.log("ooooo")
      this.changeZ("width:1%");
      this.changeY("width:99%");
      this.isCollapse = "kik"
    },
    open_o(){
      this.changeZ("width:3%");
      this.changeY("width:97%");
      this.isCollapse = null
    },
    open() {
      if(this.isCollapse){
        console.log("opopop")
        this.changeZ("width:7%");
        this.changeY("width:93%");
        this.isCollapse = null

      }else{
        this.isCollapse = "lko"
        this.changeZ("width:1%");
        this.changeY("width:99%");
      }
    },
    handleOpen(key, keyPath) {},
    handleClose(key, keyPath) {},
  },
};
</script>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>