2020-07-01 07:08:21 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits OverlayTrigger
|
|
|
|
|
|
|
|
|
|
@using AntDesign.Internal
|
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
|
@if (ChildContent != null)
|
|
|
|
|
{
|
|
|
|
|
<div class="@ClassMapper.Class" @ref="@Ref" Id="@Id" style="display: inline-flex; @Style"
|
|
|
|
|
@onclick="OnClickDiv"
|
|
|
|
|
@onmouseenter="OnTriggerMouseEnter"
|
|
|
|
|
@onmouseleave="OnTriggerMouseLeave"
|
|
|
|
|
@oncontextmenu="OnTriggerContextmenu"
|
|
|
|
|
@onfocusin="OnTriggerFocusIn"
|
|
|
|
|
@onfocusout="OnTriggerFocusOut"
|
|
|
|
|
@oncontextmenu:preventDefault>
|
|
|
|
|
@ChildContent
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if (Unbound != null)
|
|
|
|
|
{
|
|
|
|
|
@Unbound(RefBack)
|
|
|
|
|
}
|
2020-07-01 07:08:21 +08:00
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
|
|
|
|
|
|
<CascadingValue Value="this" Name="Trigger" IsFixed="@true">
|
2020-07-01 07:08:21 +08:00
|
|
|
|
<CascadingValue Value="@ArrowPointAtCenter" Name="ArrowPointAtCenter">
|
|
|
|
|
<Overlay @ref="_overlay"
|
|
|
|
|
OnOverlayMouseEnter="OnOverlayMouseEnter"
|
2021-06-03 18:54:41 +08:00
|
|
|
|
OnOverlayMouseLeave="OnOverlayMouseLeave"
|
|
|
|
|
OnOverlayMouseUp="OnOverlayMouseUp">
|
2020-07-01 07:08:21 +08:00
|
|
|
|
|
|
|
|
|
<div class="ant-popover-content">
|
|
|
|
|
<div class="ant-popover-arrow">
|
|
|
|
|
<span class="ant-popover-arrow-content"></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-popover-inner" role="tooltip">
|
|
|
|
|
<div class="ant-popover-inner-content">
|
|
|
|
|
<div class="ant-popover-message">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (IconTemplate != null)
|
2020-07-01 07:08:21 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@IconTemplate
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Icon Type="@Icon" />
|
2020-07-01 07:08:21 +08:00
|
|
|
|
}
|
|
|
|
|
<div class="ant-popover-message-title">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
2020-07-01 07:08:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-popover-buttons">
|
|
|
|
|
@if (CancelButtonProps != null)
|
|
|
|
|
{
|
|
|
|
|
<Button OnClick="@Cancel" Size="@AntSizeLDSType.Small"
|
|
|
|
|
Block="@CancelButtonProps.Block"
|
|
|
|
|
Ghost="@CancelButtonProps.Ghost"
|
|
|
|
|
Search="@CancelButtonProps.Search"
|
|
|
|
|
Loading="@CancelButtonProps.Loading"
|
|
|
|
|
Type="@CancelButtonProps.Type"
|
|
|
|
|
Shape="@CancelButtonProps.Shape"
|
|
|
|
|
Icon="@CancelButtonProps.Icon"
|
|
|
|
|
Disabled="@CancelButtonProps.Disabled"
|
2020-08-22 09:24:55 +08:00
|
|
|
|
Danger="@CancelButtonProps.IsDanger">
|
2020-07-01 07:08:21 +08:00
|
|
|
|
@CancelText
|
|
|
|
|
</Button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Button OnClick="@Cancel" Size="@AntSizeLDSType.Small">
|
|
|
|
|
@CancelText
|
|
|
|
|
</Button>
|
|
|
|
|
}
|
|
|
|
|
@if (OkButtonProps != null)
|
|
|
|
|
{
|
|
|
|
|
<Button OnClick="@Confirm" Size="small" Type="@OkType"
|
|
|
|
|
Block="@OkButtonProps.Block"
|
|
|
|
|
Ghost="@OkButtonProps.Ghost"
|
|
|
|
|
Search="@OkButtonProps.Search"
|
|
|
|
|
Loading="@OkButtonProps.Loading"
|
|
|
|
|
Shape="@OkButtonProps.Shape"
|
|
|
|
|
Icon="@OkButtonProps.Icon"
|
|
|
|
|
Disabled="@OkButtonProps.Disabled"
|
2020-08-22 09:24:55 +08:00
|
|
|
|
Danger="@OkButtonProps.IsDanger">
|
2020-07-01 07:08:21 +08:00
|
|
|
|
@OkText
|
|
|
|
|
</Button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Button OnClick="@Confirm" Size="small" type="@OkType">
|
|
|
|
|
@OkText
|
|
|
|
|
</Button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Overlay>
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
</CascadingValue>
|