2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-05-03 21:46:21 +08:00
|
|
|
|
@inherits AntDomComponentBase
|
2020-05-21 14:49:07 +08:00
|
|
|
|
@typeparam TItem
|
2020-05-03 21:46:21 +08:00
|
|
|
|
|
2020-05-21 14:49:07 +08:00
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" Id="@Id">
|
2020-05-03 21:46:21 +08:00
|
|
|
|
|
2020-05-21 14:49:07 +08:00
|
|
|
|
@if (Header != null)
|
|
|
|
|
{
|
|
|
|
|
<div class="@PrefixName-header">
|
|
|
|
|
@Header
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (DataSource != null && DataSource.Any())
|
|
|
|
|
{
|
|
|
|
|
<Spin Spinning="Loading">
|
2020-09-17 10:09:20 +08:00
|
|
|
|
@if (Grid != null)
|
|
|
|
|
{
|
|
|
|
|
<Row Gutter="Grid.Gutter">
|
|
|
|
|
@foreach (var item in DataSource)
|
2020-09-18 00:03:44 +08:00
|
|
|
|
{
|
|
|
|
|
<CascadingValue Value="ItemLayout">
|
|
|
|
|
<CascadingValue Value="()=>HandleItemClick(item)" TValue="Action" Name="ItemClick">
|
|
|
|
|
@ChildContent(item)
|
|
|
|
|
</CascadingValue>
|
2020-09-17 10:09:20 +08:00
|
|
|
|
</CascadingValue>
|
|
|
|
|
}
|
|
|
|
|
</Row>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<ul class="ant-list-items">
|
|
|
|
|
@foreach (var item in DataSource)
|
|
|
|
|
{
|
2020-09-18 00:03:44 +08:00
|
|
|
|
<CascadingValue Value="ItemLayout">
|
|
|
|
|
<CascadingValue Value="()=>HandleItemClick(item)" TValue="Action" Name="ItemClick">
|
|
|
|
|
@ChildContent(item)
|
|
|
|
|
</CascadingValue>
|
2020-09-17 10:09:20 +08:00
|
|
|
|
</CascadingValue>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
}
|
2020-05-21 14:49:07 +08:00
|
|
|
|
</Spin>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<div style="min-height:53px" />
|
|
|
|
|
}
|
2020-05-03 21:46:21 +08:00
|
|
|
|
|
2020-05-21 14:49:07 +08:00
|
|
|
|
@if (Footer != null)
|
|
|
|
|
{
|
|
|
|
|
<div class="@PrefixName-footer">
|
|
|
|
|
@Footer
|
2020-05-03 21:46:21 +08:00
|
|
|
|
</div>
|
2020-05-21 14:49:07 +08:00
|
|
|
|
}
|
|
|
|
|
@if (LoadMore != null)
|
|
|
|
|
{
|
|
|
|
|
@LoadMore
|
|
|
|
|
}
|
2020-08-10 23:58:17 +08:00
|
|
|
|
|
2020-09-17 10:09:20 +08:00
|
|
|
|
</div>
|