mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 13:08:23 +08:00
75 lines
1.8 KiB
C#
75 lines
1.8 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
|
@if (!string.IsNullOrWhiteSpace(Avatar) || AvatarTemplate != null)
|
|
{
|
|
<div class="ant-card-meta-avatar">
|
|
@if (AvatarTemplate != null)
|
|
{
|
|
@AvatarTemplate
|
|
}
|
|
else
|
|
{
|
|
<Avatar Src="@Avatar" />
|
|
}
|
|
</div>
|
|
}
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Title) || TitleTemplate != null
|
|
|| !string.IsNullOrWhiteSpace(Description) || DescriptionTemplate != null)
|
|
{
|
|
<div class="ant-card-meta-detail">
|
|
@if (!string.IsNullOrWhiteSpace(Title) || TitleTemplate != null)
|
|
{
|
|
<div class="ant-card-meta-title">
|
|
@if (TitleTemplate != null)
|
|
{
|
|
@TitleTemplate
|
|
}
|
|
else
|
|
{
|
|
@Title
|
|
}
|
|
</div>
|
|
}
|
|
@if (DescriptionTemplate != null)
|
|
{
|
|
@DescriptionTemplate
|
|
}
|
|
else
|
|
{
|
|
@Description
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@code{
|
|
|
|
[Parameter]
|
|
public string Title { get; set; }
|
|
|
|
[Parameter]
|
|
public RenderFragment TitleTemplate { get; set; }
|
|
|
|
[Parameter]
|
|
public string Description { get; set; }
|
|
|
|
[Parameter]
|
|
public RenderFragment DescriptionTemplate { get; set; }
|
|
|
|
[Parameter]
|
|
public string Avatar { get; set; }
|
|
|
|
[Parameter]
|
|
public RenderFragment AvatarTemplate { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
ClassMapper.Add("ant-card-meta");
|
|
}
|
|
|
|
}
|