2.4.7
any
2.5.17
https://jsfiddle.net/mmx38qxw/6399/
by default selected one sub-menu. When click on any sub-menu - they become active as well. But now, there's no way to deactivate that sub-menu.
Regression issue here: https://github.com/ElemeFE/element/commit/6bb49b959013f3351bee9308b2e627d80d857cfd
Code should be fixed (removed this.items[this.activeIndex]) in order to be able to control active sub-menu.
Due to regression in https://github.com/ElemeFE/element/commit/6bb49b959013f3351bee9308b2e627d80d857cfd it's impossible to control active sub-menu now
May be you can have a try like this:
Set attribute default-active to 'placeholder' that produced by an invisible element <el-menu-item index="placeholder" v-show="false" />. It's not a final solution but seems to be 'unselected'.
It works to me. @industral
Thanks! Works for me as well. Had to change a lot of code though.
Another way to solve it, you can just set activeIndex to a value that doesn't match any of your menu-items' index through this.refs['yourMenuRef'].activeIndex = 'xxx'
@industral
Most helpful comment
Another way to solve it, you can just set
activeIndexto a value that doesn't match any of your menu-items' index throughthis.refs['yourMenuRef'].activeIndex = 'xxx'@industral