2020-05-29 00:33:49 +08:00
|
|
|
@namespace AntDesign
|
2019-12-17 14:39:23 +08:00
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
|
2020-09-20 10:43:40 +08:00
|
|
|
@if (!string.IsNullOrWhiteSpace(Avatar) || AvatarTemplate != null)
|
2019-12-17 14:39:23 +08:00
|
|
|
{
|
|
|
|
<div class="ant-card-meta-avatar">
|
2020-09-20 10:43:40 +08:00
|
|
|
@if (AvatarTemplate != null)
|
|
|
|
{
|
|
|
|
@AvatarTemplate
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<Avatar Src="@Avatar" />
|
|
|
|
}
|
2019-12-17 14:39:23 +08:00
|
|
|
</div>
|
|
|
|
}
|
2020-09-20 10:43:40 +08:00
|
|
|
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Title) || TitleTemplate != null
|
|
|
|
|| !string.IsNullOrWhiteSpace(Description) || DescriptionTemplate != null)
|
2019-12-17 14:39:23 +08:00
|
|
|
{
|
|
|
|
<div class="ant-card-meta-detail">
|
2020-09-20 10:43:40 +08:00
|
|
|
@if (!string.IsNullOrWhiteSpace(Title) || TitleTemplate != null)
|
2019-12-17 14:39:23 +08:00
|
|
|
{
|
|
|
|
<div class="ant-card-meta-title">
|
2020-09-20 10:43:40 +08:00
|
|
|
@if (TitleTemplate != null)
|
|
|
|
{
|
|
|
|
@TitleTemplate
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
@Title
|
|
|
|
}
|
2019-12-17 14:39:23 +08:00
|
|
|
</div>
|
|
|
|
}
|
2020-09-20 10:43:40 +08:00
|
|
|
@if (DescriptionTemplate != null)
|
|
|
|
{
|
|
|
|
@DescriptionTemplate
|
|
|
|
}
|
|
|
|
else
|
2019-12-17 14:39:23 +08:00
|
|
|
{
|
|
|
|
@Description
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@code{
|
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
[Parameter]
|
2020-09-20 10:43:40 +08:00
|
|
|
public string Title { get; set; }
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public RenderFragment TitleTemplate { get; set; }
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public RenderFragment DescriptionTemplate { get; set; }
|
2019-12-17 14:39:23 +08:00
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
[Parameter]
|
2020-09-20 10:43:40 +08:00
|
|
|
public string Avatar { get; set; }
|
2019-12-17 14:39:23 +08:00
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
[Parameter]
|
2020-09-20 10:43:40 +08:00
|
|
|
public RenderFragment AvatarTemplate { get; set; }
|
2019-12-17 14:39:23 +08:00
|
|
|
|
|
|
|
protected override void OnInitialized()
|
|
|
|
{
|
|
|
|
base.OnInitialized();
|
|
|
|
ClassMapper.Add("ant-card-meta");
|
|
|
|
}
|
|
|
|
|
2020-04-23 17:13:56 +08:00
|
|
|
}
|