mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
fix(menu): submenu title & expand names
This commit is contained in:
parent
a975316530
commit
d5ba53948d
@ -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 ||
|
||||
|
@ -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)
|
||||
|
@ -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']))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user