mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
d16144ece0
* refactor: button * refactor: avatar * refactor: alert * fix: input group compact
58 lines
1.3 KiB
C#
58 lines
1.3 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
<div class="@ClassMapper.Class" style="@Style">
|
|
|
|
@if (Avatar.IsT0 && Avatar.AsT0 != "")
|
|
{
|
|
<div class="ant-list-item-meta-avatar">
|
|
<Avatar Src="@Avatar.AsT0"></Avatar>
|
|
</div>
|
|
}
|
|
|
|
@if (Avatar.IsT1 && Avatar.AsT1 != null)
|
|
{
|
|
<div class="ant-list-item-meta-avatar">
|
|
@Avatar.AsT1
|
|
</div>
|
|
}
|
|
|
|
<div class="ant-list-item-meta-content">
|
|
<div>
|
|
<h4 class="ant-list-item-meta-title">
|
|
@Title
|
|
</h4>
|
|
</div>
|
|
<div class="ant-list-item-meta-description">
|
|
@Description
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@code{
|
|
public string PrefixName { get; set; } = "ant-list-item-meta";
|
|
|
|
[Parameter] public RenderFragment Title { get; set; }
|
|
|
|
[Parameter] public OneOf.OneOf<string, RenderFragment> Avatar { get; set; }
|
|
|
|
[Parameter] public string Description { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
SetClassMap();
|
|
}
|
|
|
|
protected override void OnParametersSet()
|
|
{
|
|
base.OnParametersSet();
|
|
SetClassMap();
|
|
}
|
|
|
|
protected void SetClassMap()
|
|
{
|
|
ClassMapper.Clear()
|
|
.Add(PrefixName);
|
|
}
|
|
} |