2020-06-02 14:25:44 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
<div @ref="@_element">
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div class=@($"{Config.PrefixCls}-root")>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
@if (Config.Mask)
|
|
|
|
|
{
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div class=@($"{Config.PrefixCls}-mask {GetMaskClsName()}") style="@Config.MaskStyle"></div>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
}
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div tabindex="-1" id=@($"{Config.PrefixCls}-wrap_{DialogWrapperId}") class=@($"{Config.PrefixCls}-wrap {Config.GetWrapClassNameExtended()}") role="dialog"
|
2021-04-04 15:40:54 +08:00
|
|
|
|
@onclick="@EventUtil.AsNonRenderingEventHandler(OnMaskClick)"
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@onkeydown="@OnKeyDown"
|
|
|
|
|
style="@_wrapStyle">
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div @ref="@_modal" role="document" class=@($"{Config.PrefixCls} {GetModalClsName()}")
|
2021-04-04 15:40:54 +08:00
|
|
|
|
@onmousedown="@EventUtil.AsNonRenderingEventHandler(OnDialogMouseDown)"
|
2021-01-21 19:07:21 +08:00
|
|
|
|
style="@GetStyle()">
|
|
|
|
|
<div id="@_sentinelStart" tabindex="0" aria-hidden="true" style="width: 0px; height: 0px; overflow: hidden; outline: none;"></div>
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div class=@($"{Config.PrefixCls}-content")>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@if (Config.Closable)
|
|
|
|
|
{
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<button type="button" aria-label="Close" class=@($"{Config.PrefixCls}-close") @onclick="@OnCloserClick">
|
|
|
|
|
<span class=@($"{Config.PrefixCls}-close-x")>
|
|
|
|
|
<span role="img" aria-label="close" class=@($"anticon anticon-close {Config.PrefixCls}-close-icon")>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@Config.CloseIcon
|
|
|
|
|
</span>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
</span>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
</button>
|
|
|
|
|
}
|
|
|
|
|
@if (Config.TitleTemplate != null)
|
|
|
|
|
{
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div @ref="@_dialogHeader" class=@($"{Config.PrefixCls}-header") style="@Config.GetHeaderStyle()">
|
|
|
|
|
<div class=@($"{Config.PrefixCls}-title")>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@Config.TitleTemplate
|
|
|
|
|
</div>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
</div>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
}
|
|
|
|
|
else if (!string.IsNullOrWhiteSpace(Config.Title))
|
|
|
|
|
{
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div @ref="@_dialogHeader" class=@($"{Config.PrefixCls}-header") style="@Config.GetHeaderStyle()">
|
|
|
|
|
<div class=@($"{Config.PrefixCls}-title")>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@Config.Title
|
|
|
|
|
</div>
|
2020-12-26 21:39:04 +08:00
|
|
|
|
</div>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
}
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div class=@($"{Config.PrefixCls}-body") style="@Config.BodyStyle">
|
2021-01-21 19:07:21 +08:00
|
|
|
|
@ChildContent
|
|
|
|
|
</div>
|
|
|
|
|
@if (Config.Footer != null)
|
|
|
|
|
{
|
2021-01-27 13:23:15 +08:00
|
|
|
|
<div class=@($"{Config.PrefixCls}-footer")>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
<CascadingValue Value="@Config">
|
|
|
|
|
@if (Config.Footer.Value.IsT0)
|
2020-06-02 14:25:44 +08:00
|
|
|
|
{
|
|
|
|
|
@(Config.Footer.Value.AsT0)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@(Config.Footer.Value.AsT1)
|
|
|
|
|
}
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
</div>
|
2021-01-21 19:07:21 +08:00
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div id="@_sentinelEnd" tabindex="0" aria-hidden="true" style="width: 0px; height: 0px; overflow: hidden; outline: none;"></div>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|