ant-design-blazor/components/menu/internal/SubMenuTrigger.razor
2021-07-05 13:45:59 +08:00

27 lines
807 B
C#

@namespace AntDesign.Internal
@inherits OverlayTrigger
@{
string prefixCls = $"{SubMenuComponent.RootMenu.PrefixCls}-submenu";
}
<li class="@TriggerClass"
role="menuitem"
style="position:relative;@SubMenuComponent.Style"
@key="SubMenuComponent.Key"
@ref="@Ref"
@onclick="OnClickDiv"
@onmouseenter="OnTriggerMouseEnter"
@onmouseleave="OnTriggerMouseLeave"
@oncontextmenu="OnTriggerContextmenu"
@oncontextmenu:preventDefault>
@ChildContent
</li>
<CascadingValue Value="this" Name="Trigger">
<Overlay @ref="_overlay"
OverlayChildPrefixCls="@($"{prefixCls}-menu")"
OnOverlayMouseEnter="OnOverlayMouseEnter"
OnOverlayMouseLeave="OnOverlayMouseLeave"
OnOverlayMouseUp="OnOverlayMouseUp" />
</CascadingValue>