fix(menu): submenu title & expand names

This commit is contained in:
07akioni 2020-11-14 15:12:16 +08:00
parent a975316530
commit d5ba53948d
3 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ export default {
type: Number,
default: 32
},
defaultExpandedAll: {
defaultExpandAll: {
type: Boolean,
default: false
},
@ -125,7 +125,7 @@ export default {
}
}))
const uncontrolledExpandedKeysRef = ref(
props.defaultExpandedAll
props.defaultExpandAll
? treeMateRef.value.getNonLeafKeys()
: (
props.defaultExpandedNames ||

View File

@ -67,7 +67,7 @@ export default {
if (this.menuCollapsed) {
return true
}
return this.NMenu.mergedExpandedKeys.includes(this.internalKey)
return !this.NMenu.mergedExpandedKeys.includes(this.internalKey)
},
popoverEnabled () {
return !this.mergedDisabled && (this.horizontal || this.menuCollapsed)

View File

@ -26,7 +26,7 @@ export function itemRenderer (tmNode, insidePopover = false) {
)
)
}
return h(NSubmenu, omit(props, ['children', 'name'], { tmNodes: tmNode.children }))
return h(NSubmenu, omit(props, ['children', 'name', 'type', 'titleExtra'], { tmNodes: tmNode.children }))
} else {
return h(NMenuItem, omit(props, ['children', 'name', 'titleExtra']))
}