mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
62 lines
1.6 KiB
C#
62 lines
1.6 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItem
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" Id="@Id">
|
|
|
|
@if (Header != null)
|
|
{
|
|
<div class="@PrefixName-header">
|
|
@Header
|
|
</div>
|
|
}
|
|
|
|
@if (DataSource != null && DataSource.Any())
|
|
{
|
|
<Spin Spinning="Loading">
|
|
@if (Grid != null)
|
|
{
|
|
<Row Gutter="Grid.Gutter">
|
|
@foreach (var item in DataSource)
|
|
{
|
|
<CascadingValue Value="ItemLayout">
|
|
<CascadingValue Value="()=>HandleItemClick(item)" TValue="Action" Name="ItemClick">
|
|
@ChildContent(item)
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
}
|
|
</Row>
|
|
}
|
|
else
|
|
{
|
|
<ul class="ant-list-items">
|
|
@foreach (var item in DataSource)
|
|
{
|
|
<CascadingValue Value="ItemLayout">
|
|
<CascadingValue Value="()=>HandleItemClick(item)" TValue="Action" Name="ItemClick">
|
|
@ChildContent(item)
|
|
</CascadingValue>
|
|
</CascadingValue>
|
|
}
|
|
</ul>
|
|
}
|
|
</Spin>
|
|
}
|
|
else
|
|
{
|
|
<div style="min-height:53px" />
|
|
}
|
|
|
|
@if (Footer != null)
|
|
{
|
|
<div class="@PrefixName-footer">
|
|
@Footer
|
|
</div>
|
|
}
|
|
@if (LoadMore != null)
|
|
{
|
|
@LoadMore
|
|
}
|
|
|
|
</div>
|