mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
@namespace AntDesign
|
|
@inherits OverlayTrigger
|
|
@using AntDesign.Internal
|
|
|
|
<div class="@ClassMapper.Class"
|
|
style="display: inline-block; width: fit-content; @Style"
|
|
id="@Id"
|
|
@ref="@Ref"
|
|
@onclick="OnClickDiv"
|
|
@onmouseenter="OnTriggerMouseEnter"
|
|
@onmouseleave="OnTriggerMouseLeave"
|
|
@oncontextmenu="OnTriggerContextmenu"
|
|
@oncontextmenu:preventDefault>
|
|
@if (IsButton)
|
|
{
|
|
<CascadingValue Value="this">
|
|
<DropdownGroupButton>
|
|
<LeftButton>
|
|
<Button @key="1" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled">@ChildContent</Button>
|
|
</LeftButton>
|
|
<RightButton>
|
|
<Button @key="2" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled" OnClick="OnTriggerClick" Class="ant-dropdown-trigger" Icon="@_rightButtonIcon" />
|
|
</RightButton>
|
|
</DropdownGroupButton>
|
|
</CascadingValue>
|
|
}
|
|
else
|
|
{
|
|
@ChildContent
|
|
}
|
|
</div>
|
|
|
|
<CascadingValue Value="this" Name="Trigger">
|
|
<Overlay @ref="_overlay"
|
|
OverlayChildPrefixCls="@($"{PrefixCls}-menu")"
|
|
OnOverlayMouseEnter="OnOverlayMouseEnter"
|
|
OnOverlayMouseLeave="OnOverlayMouseLeave" />
|
|
</CascadingValue>
|