fix[menu]: the native title attribute of the SubMenu component is always null
parent
4a37016f4e
commit
973cd2e269
|
@ -257,14 +257,15 @@ export default defineComponent({
|
||||||
const subMenuPrefixClsValue = subMenuPrefixCls.value;
|
const subMenuPrefixClsValue = subMenuPrefixCls.value;
|
||||||
const icon = props.icon ?? slots.icon?.(props);
|
const icon = props.icon ?? slots.icon?.(props);
|
||||||
const expandIcon = props.expandIcon || slots.expandIcon || menuExpandIcon.value;
|
const expandIcon = props.expandIcon || slots.expandIcon || menuExpandIcon.value;
|
||||||
const title = renderTitle(getPropsSlot(slots, props, 'title'), icon);
|
const originTitle = getPropsSlot(slots, props, 'title');
|
||||||
|
const title = renderTitle(originTitle, icon);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={directionStyle.value}
|
style={directionStyle.value}
|
||||||
class={`${subMenuPrefixClsValue}-title`}
|
class={`${subMenuPrefixClsValue}-title`}
|
||||||
tabindex={mergedDisabled.value ? null : -1}
|
tabindex={mergedDisabled.value ? null : -1}
|
||||||
ref={elementRef}
|
ref={elementRef}
|
||||||
title={typeof title === 'string' ? title : null}
|
title={typeof originTitle === 'string' ? originTitle : null}
|
||||||
data-menu-id={key}
|
data-menu-id={key}
|
||||||
aria-expanded={open.value}
|
aria-expanded={open.value}
|
||||||
aria-haspopup
|
aria-haspopup
|
||||||
|
|
Loading…
Reference in New Issue