element-plus [Component] [menu, menu-item] el-menu expands the parent menu of the selected submenu in the collapsed state

3htmauhk  于 5个月前  发布在  其他
关注(0)|答案(5)|浏览(43)

Bug Type: Component

Environment

  • Vue Version: 3.2.0
  • Element Plus Version: 2.2.0
  • Browser / OS: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
  • Build Tool: Webpack

Reproduction

  • el-menu
  • el-menu-item

Element Plus Playground

Steps to reproduce

When the submenu is selected, shrink the menu, and the selected parent menu will automatically shrink

What is Expected?

I hope that when the menu is shrunk, the parent menu of the selected submenu is expanded, and the required icon can be customized to present the submenu when the menu is shrunk.

What is actually happening?

When shrinking the menu, the parent menu of the selected submenu will shrink automatically

Additional comments

(empty)

fzwojiic

fzwojiic1#

I think this is a functional requirement, not a bug. Anyone with the same requirement? Want to achieve the same effect as the background menu of Google Ads

llycmphe

llycmphe2#

Using the open event of Menu Events does not seem to be able to do it

uinbv5nw

uinbv5nw3#

This is the rendering I want to achieve

pw136qt2

pw136qt24#

@sxzz Does the el-menu component support this feature?

相关问题