-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Cannot read property 'propsData' of undefined at VueComponent.renderCommonMenuItem #577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi there! You should import custom sub-menu component (see docs) |
But i have already input |
@xiayuying |
Hi, I have a similar issue, I used the fully imported Antd but I want to switch to importing components one by one, if I import "Menu", I have the same "Cannot read property 'propsData' of undefined when I replace <a-menu ..> with <Menu ..> |
@mgnrfk Have you found any solution? |
This appears to be a design problem in SubPopupMenu::render() around line 393, where the code makes an assumption that child nodes are antd menu items. That prevents using other components within such as OP's example, or portals/slots for dynamic menus, and so on. For example, you will get the error doing code below if the slot contains anything other than antd items (such as wrappers):
|
|
When I wanted to use ant-design-vue dropdown menu plugin, I was getting such kind of error. My components registrations was like this; components: {
'a-menu': Menu,
'a-menu-item': Menu.Item,
'a-dropdown': Dropdown,
} Then I removed the 'a-menu-item' line, the error disappeared components: {
'a-menu': Menu,
'a-dropdown': Dropdown,
} maybe it could be help |
same issue |
加了还是有问题 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
1.3.5
Environment
Windows x64, Chrome 70, vue-cli 3.5.0
Reproduction link
Steps to reproduce
follow the step: https://vue.ant.design/components/menu-cn/#API
What is expected?
It should be the same as the image example of the official website.
What is actually happening?
throw an error:
The text was updated successfully, but these errors were encountered: