fix(menu): item vnode should has key

This commit is contained in:
07akioni 2021-02-18 22:02:45 +08:00
parent effb098cb1
commit 4af0c3d0be

View File

@ -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
})
)