ant-design-blazor/components/dropdown/internal/AntDropdownOverlay.razor
笨木头 ab58b3b429 fix: datepicker issue #94 (#101)
* fix(module: dropdown): fix bug of default show

* fix(module: datepicker): #94

Co-authored-by: 钟迪龙 <mutouzdl@hotmail.com>
2020-05-10 17:33:09 +08:00

30 lines
961 B
Plaintext

@namespace AntBlazor.Internal
@inherits AntDomComponentBase
@using AntBlazor.core.Internal
@if (_hasAddOverlayToBody == true || _isWaitForOverlayFirstRender)
{
string display = _isOverlayShow ? "" : "visibility: hidden;";
string overlayCls;
if (!_isOverlayShow && !_isWaitForOverlayFirstRender)
{
overlayCls = $"{Dropdown.PrefixCls}-hidden";
display = "";
}
else
{
overlayCls = _overlayCls;
}
<div class="@(Dropdown.PrefixCls) @(Dropdown.OverlayClassName) @(Dropdown.PrefixCls)-placement-@(Dropdown.Placement.Name) @overlayCls"
style="width: fit-content; position: absolute; @display @Dropdown.OverlayStyle @_dropdownStyle"
@ref="Ref"
@onmouseenter="OnOverlayMouseEnter"
@onmouseleave="OnOverlayMouseLeave">
<CascadingValue Value="@($"{Dropdown.PrefixCls}-menu")" Name="PrefixCls">
@Dropdown.Overlay
</CascadingValue>
</div>
}