Element UI el-menu collapse all on button click
I want to collapse my el-menu and remove active selection when a button is pressed. I"ve read the documents and tried using the close menu method but have not had success.
Please help!
Here is the code where I define my navbar, please note that I am using VUE.
<el-menu default-active="1" unique-opened="1" class="el-menu-vertical" @open="handleOpen" @close="handleClose" background-color="white" text-color="-sharp343a40" active-text-color="-sharp2095f2" id="elmenu">
<el-submenu v-for="category, index in keys" :index="category" :value="category" :id="category">
<template slot="title">
<span>
<v-icon small right>fa-cog</v-icon>
{{category}}
</span>
</template>
<el-menu-item v-for="item in catsys[keys[index]]" :index="item.systemname" @click.native="gotoSystem(item.systemname)">
<v-icon small left>fa-adjust</v-icon>
<span>{{item.systemname}}</span>
</el-menu-item>
</el-submenu>
</el-menu>
Thanks for any help! I would really like to make this menu collapse when I click on a roomon!