title: How can I open an element menu using element-ui?
body: <p>I have a menu and want to open an element manually with a method but I can't find any info about how can I do it.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;script src="//unpkg.com/vue/dist/vue.js"&gt;&lt;/script&gt;
  &lt;script src="//unpkg.com/element-ui@2.4.5/lib/index.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
  &lt;el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"&gt;
  &lt;el-submenu index="1"&gt;
    &lt;template slot="title"&gt;
      &lt;i class="el-icon-location"&gt;&lt;/i&gt;
      &lt;span&gt;Navigator One&lt;/span&gt;
    &lt;/template&gt;
    &lt;el-menu-item-group title="Group One"&gt;
      &lt;el-menu-item index="1-1"&gt;item one&lt;/el-menu-item&gt;
      &lt;el-menu-item index="1-2"&gt;item one&lt;/el-menu-item&gt;
    &lt;/el-menu-item-group&gt;
    &lt;el-menu-item-group title="Group Two"&gt;
      &lt;el-menu-item index="1-3"&gt;item three&lt;/el-menu-item&gt;
    &lt;/el-menu-item-group&gt;
    &lt;el-submenu index="1-4"&gt;
      &lt;template slot="title"&gt;item four&lt;/template&gt;
      &lt;el-menu-item index="1-4-1"&gt;item one&lt;/el-menu-item&gt;
    &lt;/el-submenu&gt;
  &lt;/el-submenu&gt;
  &lt;el-menu-item index="2"&gt;
    &lt;i class="el-icon-menu"&gt;&lt;/i&gt;
    &lt;span&gt;Navigator Two&lt;/span&gt;
  &lt;/el-menu-item&gt;
  &lt;el-menu-item index="3" disabled&gt;
    &lt;i class="el-icon-document"&gt;&lt;/i&gt;
    &lt;span&gt;Navigator Three&lt;/span&gt;
  &lt;/el-menu-item&gt;
  &lt;el-menu-item index="4"&gt;
    &lt;i class="el-icon-setting"&gt;&lt;/i&gt;
    &lt;span&gt;Navigator Four&lt;/span&gt;
  &lt;/el-menu-item&gt;
  &lt;/el-menu&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>Main = {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
  }
  var Ctor = Vue.extend(Main)
  new Ctor().$mount('#app')
  </code></pre>
  
  <p>The idea is to be able to toogle the open and close of the first element of the menu manually not only on click</p>
  
  <p>example:
  <a href="https://jsfiddle.net/aL4w1zgr/" rel="nofollow noreferrer">https://jsfiddle.net/aL4w1zgr/</a></p>