Feature type: Enhancement
Details
- Enhanced component name:
menu-item
Description
This issue is as much a question as it is a feature request.
At the moment, el-menu-item
output a <li>
element, with a click event attached:
<li class="el-menu-item is-active" role="menuitem" tabindex="0">Processing Center</li>
Why not output a el-link
or a el-button
?
It would be more semantic, the role
attribute and the tabindex
wouldn't be necessary anymore. The element to render could be passed as a props, el-link
by default and el-button
if fooProps=true
?
What do you think ?
Edit:
I would add that it would allow user to do ctrl + click
or middle-click
on the element to open it in a new tab, that behavior is broken because of the actual markup.
2条答案
按热度按时间6uxekuva1#
I might try to tackle it myself, but I would like some insight.
a
andbutton
tag ? Might be a boolean propsbutton
, might also be a propshref
We could work on something like that:
What do you think?
yqyhoc1h2#
It's really helpful! The current menu-item behavior does not support opening with Ctrl+click or middle-click, nor does it support opening in a new window from the right-click menu, which is very frustrating for me.