2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-04-23 17:13:56 +08:00
|
|
|
|
@inherits AntDomComponentBase
|
2020-04-20 10:03:32 +08:00
|
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
|
<div class="@ClassMapper.Class" @ref="@Ref" style="@Style" id="@Id">
|
2020-04-20 10:03:32 +08:00
|
|
|
|
<div class="@(PrefixCls)-image" style="@ImageStyle">
|
|
|
|
|
@if (Image.IsT0 && !string.IsNullOrEmpty(Image.AsT0))
|
|
|
|
|
{
|
|
|
|
|
Description.TryPickT0(out string des, out _);
|
|
|
|
|
string alt = !string.IsNullOrEmpty(des) ? des : "empty";
|
|
|
|
|
<img alt="@alt" src="@Image.AsT0" />
|
|
|
|
|
}
|
2020-06-02 19:15:15 +08:00
|
|
|
|
else if (Simple)
|
|
|
|
|
{
|
|
|
|
|
@PRESENTED_IMAGE_SIMPLE
|
|
|
|
|
}
|
2020-04-20 10:03:32 +08:00
|
|
|
|
else if (Image.IsT1 && Image.AsT1 != null)
|
|
|
|
|
{
|
|
|
|
|
@Image.AsT1
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@PRESENTED_IMAGE_DEFAULT
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (Description.IsT0 && !string.IsNullOrEmpty(Description.AsT0))
|
|
|
|
|
{
|
|
|
|
|
<p class="@(PrefixCls)-description">@Description.AsT0</p>
|
|
|
|
|
}
|
|
|
|
|
@if (Description.IsT2 && Description.AsT2 != null)
|
|
|
|
|
{
|
|
|
|
|
<p class="@(PrefixCls)-description">@Description.AsT2</p>
|
|
|
|
|
}
|
|
|
|
|
<div class="@(PrefixCls)-footer">
|
|
|
|
|
@ChildContent
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
{
|
2020-05-18 14:46:42 +08:00
|
|
|
|
public static RenderFragment PRESENTED_IMAGE_DEFAULT =@<EmptyDefaultImg />;
|
2020-04-20 10:03:32 +08:00
|
|
|
|
|
2020-05-18 14:46:42 +08:00
|
|
|
|
public static RenderFragment PRESENTED_IMAGE_SIMPLE = @<EmptySimpleImg />;
|
2020-04-20 10:03:32 +08:00
|
|
|
|
}
|