Skip to content

openOnceKey 为false时,父菜单需要点击多次才能折叠。 #290

Open
@srrgithub

Description

@srrgithub

🐛 Bug 描述 Bug description

组件版本号:
@ant-desingn-vue/[email protected]

代码:
<pro-layout :openOnceKey="false">

结果:
左侧菜单无法折叠,需要多次点击才行。

猜测原因:
原因在于内部组件BaseMenu.jsx 中的 updateMenu方法没有做去重校验,导致路径重复添加,所以openKeys存在重复的路径,导致父菜单需要点击多次才能折叠。

🏞 期望结果 Desired result

希望能够之点击一次就能折叠。

🚑 其他信息 Other information

内部实现:
image

希望做的功能:
这个地方需要做去重判断
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions