-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
menu组件items参数使用computed计算属性且label参数值为VNode时出现很多错误 #6864
Comments
Hello @catpigdog. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @catpigdog,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
@catpigdog openKeys selectedKeys 参数没作用,是因为你没有给 key 值吧,看了一眼你仓库。其他地方你要不再仔细描述一下?[😛] |
|
icon和我这个问题无关,主要是由label传入Vnode后,且由vue computed计算属性返回就会出现布局错乱问题: const items = computed(() => [
{
key: 'sub1',
icon: () => h(SettingOutlined),
label: 'Navigation Three - Submenu',
title: 'Navigation Three - Submenu',
children: [
{
type: 'group',
label: 'Item 1',
children: [
{
label: h(AppstoreOutlined),
title: 'setting:1',
key: 'setting:1',
},
{
label: 'Option 2',
key: 'setting:2',
},
],
}
],
}
]); |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Version
4.0.0-rc.6
Environment
vue3
Reproduction link
https://github.com/catpigdog/bug-antdforvue-menu
Steps to reproduce
使用Menu时 items参数传入一个computed返回值ItemType,且ItemType的label属性值为VNode时
menu会出现样式错乱,openKeys selectedKeys 参数没作用, inline-collapsed 参数改变时报错
What is expected?
正确渲染
What is actually happening?
报错 渲染错乱
ItemType['label'] VueNode 能改为 VueNode | ()=>VueNode 就很棒
The text was updated successfully, but these errors were encountered: