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">
|
2021-04-04 19:03:18 +08:00
|
|
|
@if (IsShowIcon)
|
2020-03-22 12:06:48 +08:00
|
|
|
{
|
2021-01-17 15:20:06 +08:00
|
|
|
@if (Icon != null)
|
2020-08-13 16:04:58 +08:00
|
|
|
{
|
|
|
|
<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
|
|
|
}
|
2021-01-17 15:20:06 +08:00
|
|
|
<div class="ant-alert-content">
|
2021-04-04 19:03:18 +08:00
|
|
|
@if (MessageTemplate != null)
|
2021-01-17 15:20:06 +08:00
|
|
|
{
|
2021-04-04 19:03:18 +08:00
|
|
|
<div class="ant-alert-message">@MessageTemplate</div>
|
2021-01-17 15:20:06 +08:00
|
|
|
}
|
2021-04-04 19:03:18 +08:00
|
|
|
else if (!string.IsNullOrEmpty(Message))
|
2021-01-17 15:20:06 +08:00
|
|
|
{
|
2021-04-04 19:03:18 +08:00
|
|
|
<div class="ant-alert-message">@Message</div>
|
2021-01-17 15:20:06 +08:00
|
|
|
}
|
2021-04-04 19:03:18 +08:00
|
|
|
|
2021-01-17 15:20:06 +08:00
|
|
|
@if (ChildContent != null)
|
|
|
|
{
|
|
|
|
<div class="ant-alert-description">@ChildContent</div>
|
|
|
|
}
|
2021-04-04 19:03:18 +08:00
|
|
|
else if (!string.IsNullOrEmpty(Description))
|
|
|
|
{
|
|
|
|
<div class="ant-alert-description">@Description</div>
|
|
|
|
}
|
2021-01-17 15:20:06 +08:00
|
|
|
</div>
|
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
|
|
|
|
{
|
2021-01-17 15:20:06 +08:00
|
|
|
<Icon Type="close" />
|
2020-06-26 22:33:17 +08:00
|
|
|
}
|
2020-03-22 12:06:48 +08:00
|
|
|
</button>
|
|
|
|
}
|
|
|
|
</div>
|
2021-04-04 19:03:18 +08:00
|
|
|
}
|