2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-05-18 14:46:42 +08:00
|
|
|
|
@inherits OverlayTrigger
|
2020-05-29 00:33:49 +08:00
|
|
|
|
@using AntDesign.Internal
|
2020-05-09 11:09:07 +08:00
|
|
|
|
|
|
|
|
|
<div class="@ClassMapper.Class"
|
2020-07-02 07:50:27 +08:00
|
|
|
|
style="display: inline-block; width: fit-content; @Style"
|
2020-05-09 11:09:07 +08:00
|
|
|
|
id="@Id"
|
|
|
|
|
@ref="@Ref"
|
|
|
|
|
@onclick="OnClickDiv"
|
|
|
|
|
@onmouseenter="OnTriggerMouseEnter"
|
|
|
|
|
@onmouseleave="OnTriggerMouseLeave"
|
|
|
|
|
@oncontextmenu="OnTriggerContextmenu"
|
|
|
|
|
@oncontextmenu:preventDefault>
|
|
|
|
|
@if (IsButton)
|
|
|
|
|
{
|
|
|
|
|
<CascadingValue Value="this">
|
2020-05-18 14:46:42 +08:00
|
|
|
|
<DropdownGroupButton>
|
2020-05-09 11:09:07 +08:00
|
|
|
|
<LeftButton>
|
2020-05-29 12:55:15 +08:00
|
|
|
|
<Button @key="1" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled">@ChildContent</Button>
|
2020-05-09 11:09:07 +08:00
|
|
|
|
</LeftButton>
|
|
|
|
|
<RightButton>
|
2020-05-29 12:55:15 +08:00
|
|
|
|
<Button @key="2" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled" OnClick="OnTriggerClick" Class="ant-dropdown-trigger" Icon="@_rightButtonIcon" />
|
2020-05-09 11:09:07 +08:00
|
|
|
|
</RightButton>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</DropdownGroupButton>
|
2020-05-09 11:09:07 +08:00
|
|
|
|
</CascadingValue>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@ChildContent
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
2020-05-18 14:46:42 +08:00
|
|
|
|
<CascadingValue Value="this" Name="Trigger">
|
|
|
|
|
<Overlay @ref="_overlay"
|
|
|
|
|
OverlayChildPrefixCls="@($"{PrefixCls}-menu")"
|
|
|
|
|
OnOverlayMouseEnter="OnOverlayMouseEnter"
|
|
|
|
|
OnOverlayMouseLeave="OnOverlayMouseLeave" />
|
|
|
|
|
</CascadingValue>
|