fix: menu Item title setting (#2528)
parent
9195ba5fa9
commit
a4389ca193
|
@ -21,8 +21,14 @@ export default {
|
||||||
const { level, title, rootPrefixCls } = props;
|
const { level, title, rootPrefixCls } = props;
|
||||||
const { getInlineCollapsed, $slots, $attrs: attrs } = this;
|
const { getInlineCollapsed, $slots, $attrs: attrs } = this;
|
||||||
const inlineCollapsed = getInlineCollapsed();
|
const inlineCollapsed = getInlineCollapsed();
|
||||||
|
let tooltipTitle = title;
|
||||||
|
if (typeof title === 'undefined') {
|
||||||
|
tooltipTitle = level === 1 ? $slots.default : '';
|
||||||
|
} else if (title === false) {
|
||||||
|
tooltipTitle = '';
|
||||||
|
}
|
||||||
const tooltipProps = {
|
const tooltipProps = {
|
||||||
title: title || (level === 1 ? $slots.default : ''),
|
title: tooltipTitle,
|
||||||
};
|
};
|
||||||
const siderCollapsed = this.layoutSiderContext.sCollapsed;
|
const siderCollapsed = this.layoutSiderContext.sCollapsed;
|
||||||
if (!siderCollapsed && !inlineCollapsed) {
|
if (!siderCollapsed && !inlineCollapsed) {
|
||||||
|
|
Loading…
Reference in New Issue