ant-design-blazor/components/list/ListItemMeta.razor.cs
yanb1 2b3e037e14 feat(module: list): ListItemMeta support description template (#959)
* Added DescriptionTemplate

* Added support for DescriptionTemplate property.
2021-01-10 22:41:57 +08:00

36 lines
925 B
C#

using Microsoft.AspNetCore.Components;
namespace AntDesign
{
public partial class ListItemMeta : AntDomComponentBase
{
public string PrefixName { get; set; } = "ant-list-item-meta";
[Parameter] public string Title { get; set; }
[Parameter] public RenderFragment TitleTemplate { get; set; }
[Parameter] public string Avatar { get; set; }
[Parameter] public RenderFragment AvatarTemplate { get; set; }
[Parameter] public string Description { get; set; }
[Parameter] public RenderFragment DescriptionTemplate { get; set; }
[CascadingParameter] public ListItem ListItem { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
SetClassMap();
}
protected void SetClassMap()
{
ClassMapper.Clear()
.Add(PrefixName);
}
}
}