Skip to content

Using a single file to recursively generate the menu selectedKeys does not take effect #4728

@someview

Description

@someview
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.2.8

Environment

win10 vite2 vue3 vscode

Reproduction link

https://github.com/fengyeall111/qtclient

Steps to reproduce

1.用antd官网提供的递归生成的菜单测试了,发现selectedKeys没问题
2.自己写的代码https://github.com/fengyeall111/qtclient,npm run dev 运行以后,浏览器访问localhost:3000,
3.用vue devtools查看menu组件,发现组件设置的selectedKeys或者defaultSelected都是生效的,然而页面上没有选中效果

What is expected?

selectedKeys设置以后页面应该是选中状态

What is actually happening?

selectedKeys设置以后页面没有反应


试过了好几种方式,自定义指令设置默认项等,觉得很别扭,只好在这寻求帮助了

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions