mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
fix(menu): item vnode should has key
This commit is contained in:
parent
effb098cb1
commit
4af0c3d0be
@ -28,12 +28,13 @@ export function itemRenderer (
|
||||
if (tmNode.isGroup) {
|
||||
return h(
|
||||
NMenuItemGroup,
|
||||
keep(props, groupPropKeys, { tmNodes: tmNode.children })
|
||||
keep(props, groupPropKeys, { tmNodes: tmNode.children, key })
|
||||
)
|
||||
}
|
||||
return h(
|
||||
NSubmenu,
|
||||
keep(props, submenuPropKeys, {
|
||||
key,
|
||||
rawNodes: tmNode.rawNode.children,
|
||||
tmNodes: tmNode.children
|
||||
})
|
||||
@ -42,6 +43,7 @@ export function itemRenderer (
|
||||
return h(
|
||||
NMenuItem,
|
||||
keep(props, itemPropKeys, {
|
||||
key,
|
||||
tmNode
|
||||
})
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user