mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
65857a63b7
Co-authored-by: James Yeung <shunjiey@hotmail.com>
57 lines
1.8 KiB
C#
57 lines
1.8 KiB
C#
@namespace AntDesign
|
|
@inherits OverlayTrigger
|
|
|
|
@using AntDesign.Internal
|
|
|
|
@if (ChildContent != null)
|
|
{
|
|
<div class="@ClassMapper.Class" @ref="@Ref" Id="@Id" style="display: inline-block; @Style"
|
|
@onclick="OnClickDiv"
|
|
@onmouseenter="OnTriggerMouseEnter"
|
|
@onmouseleave="OnTriggerMouseLeave"
|
|
@oncontextmenu="OnTriggerContextmenu"
|
|
@onfocusin="OnTriggerFocusIn"
|
|
@onfocusout="OnTriggerFocusOut"
|
|
@oncontextmenu:preventDefault>
|
|
@ChildContent
|
|
</div>
|
|
}
|
|
@if (Unbound != null)
|
|
{
|
|
@Unbound(RefBack)
|
|
}
|
|
|
|
<CascadingValue Value="this" Name="Trigger">
|
|
<CascadingValue Value="@ArrowPointAtCenter" Name="ArrowPointAtCenter">
|
|
<Overlay @ref="_overlay"
|
|
HideMillisecondsDelay="10"
|
|
WaitForHideAnimMilliseconds="100"
|
|
OnOverlayMouseEnter="OnOverlayMouseEnter"
|
|
OnOverlayMouseLeave="OnOverlayMouseLeave"
|
|
OnOverlayMouseUp="OnOverlayMouseUp">
|
|
@if (Title.Value != null)
|
|
{
|
|
<div class="ant-tooltip-content">
|
|
<div class="ant-tooltip-arrow">
|
|
<span class="ant-tooltip-arrow-content"></span>
|
|
</div>
|
|
<div class="ant-tooltip-inner" role="tooltip">
|
|
@if (Title.IsT0 && !string.IsNullOrWhiteSpace(Title.AsT0))
|
|
{
|
|
@Title.AsT0
|
|
}
|
|
else if (Title.IsT1)
|
|
{
|
|
@Title.AsT1
|
|
}
|
|
else if (Title.IsT2)
|
|
{
|
|
@Title.AsT2
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</Overlay>
|
|
</CascadingValue>
|
|
</CascadingValue>
|