ant-design-blazor/components/card/Card.razor

70 lines
1.9 KiB
C#
Raw Normal View History

@namespace AntDesign
@inherits AntDomComponentBase
2019-12-17 14:39:23 +08:00
<CascadingValue Value="this">
<div class="@ClassMapper.Class" style="@Style" id="@Id">
2020-05-16 23:27:40 +08:00
@if (Title.Value != null || Extra != null || AntCardTab != null)
2019-12-17 14:39:23 +08:00
{
<div class="ant-card-head">
<div class="ant-card-head-wrapper">
2020-05-16 23:27:40 +08:00
@if (Title.Value != null)
2019-12-17 14:39:23 +08:00
{
<div class="ant-card-head-title">
2020-05-16 23:27:40 +08:00
@if (Title.IsT0)
{
@Title.AsT0
}
else
{
@Title.AsT1
}
2019-12-17 14:39:23 +08:00
</div>
}
@if (Extra != null)
{
<div class="ant-card-extra">
@Extra
</div>
}
</div>
@if (AntCardTab != null)
{
@AntCardTab
}
</div>
}
@if (Cover != null)
{
<div class="ant-card-cover">
@Cover
</div>
}
<div class="ant-card-body" style="@BodyStyle">
@if (!Loading)
2019-12-17 14:39:23 +08:00
{
@Body
2019-12-17 17:53:25 +08:00
@ChildContent
2019-12-17 14:39:23 +08:00
}
else
{
<CardLoading></CardLoading>
2019-12-17 14:39:23 +08:00
}
</div>
@if (Actions.Count > 0)
{
<ul class="ant-card-actions">
@foreach (var action in Actions)
{
<li style="@($"width:{100 / Actions.Count}%") ">
<span>@action</span>
</li>
}
</ul>
}
</div>
</CascadingValue>