2020-05-29 00:33:49 +08:00
|
|
|
@namespace AntDesign
|
2020-04-23 17:13:56 +08:00
|
|
|
@inherits AntDomComponentBase
|
2020-03-22 12:06:48 +08:00
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
@if (!_isClosed)
|
2020-03-22 12:06:48 +08:00
|
|
|
{
|
2020-08-13 16:04:58 +08:00
|
|
|
<div data-show="@(!_isClosing||_isClosed?"true":"false")" class="@ClassMapper.Class" style="@_innerStyle @Style " Id="@Id" @ref="Ref">
|
2020-03-22 12:06:48 +08:00
|
|
|
@if (ShowIcon)
|
|
|
|
{
|
2020-08-13 16:04:58 +08:00
|
|
|
@if (Icon!=null)
|
|
|
|
{
|
|
|
|
<div class="ant-alert-icon">
|
|
|
|
@Icon
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<Icon Type="@IconType" Theme="@(string.IsNullOrWhiteSpace(Description)?"fill":"outline")" Class="ant-alert-icon" />
|
|
|
|
}
|
2020-03-22 12:06:48 +08:00
|
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(Message))
|
|
|
|
{
|
|
|
|
<span class="ant-alert-message">@Message</span>
|
|
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(Description))
|
|
|
|
{
|
|
|
|
<span class="ant-alert-description">@Description</span>
|
|
|
|
}
|
2020-06-26 22:33:17 +08:00
|
|
|
@if (ChildContent != null)
|
|
|
|
{
|
|
|
|
<span class="ant-alert-description">@ChildContent</span>
|
|
|
|
}
|
2020-03-22 12:06:48 +08:00
|
|
|
@if (Closable)
|
|
|
|
{
|
|
|
|
<button type="button" class="ant-alert-close-icon" tabindex="0" @onclick="@OnCloseHandler">
|
2020-06-26 22:33:17 +08:00
|
|
|
@if (!string.IsNullOrEmpty(CloseText))
|
|
|
|
{
|
|
|
|
<span class="ant-alert-close-text">@CloseText</span>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<Icon Type="close"/>
|
|
|
|
}
|
2020-03-22 12:06:48 +08:00
|
|
|
</button>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|