2020-05-30 01:46:41 +08:00
|
|
|
@namespace AntDesign
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
@typeparam TItem
|
|
|
|
|
2020-06-02 19:15:15 +08:00
|
|
|
<div class="ant-table-wrapper">
|
|
|
|
<Spin Spinning="Loading">
|
|
|
|
@if (ShowPagination && PaginationPosition.Contains("top"))
|
|
|
|
{
|
|
|
|
<Pagination Class="@PaginationClass" Total="_total" PageSize="_pageSize" @bind-Current="_current" />
|
|
|
|
}
|
|
|
|
<div class="ant-table">
|
|
|
|
<div class="ant-table-container">
|
|
|
|
<div class="ant-table-content">
|
|
|
|
<table style="table-layout: auto;">
|
|
|
|
<colgroup></colgroup>
|
|
|
|
<thead class="ant-table-thead">
|
|
|
|
<tr>
|
|
|
|
<CascadingValue Value="@this" TValue="ITable">
|
|
|
|
<CascadingValue Name="IsHeader" Value="true">
|
|
|
|
@if (_fieldModel != null)
|
|
|
|
{
|
|
|
|
@ChildContent(_fieldModel)
|
|
|
|
}
|
|
|
|
</CascadingValue>
|
|
|
|
</CascadingValue>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="ant-table-tbody">
|
|
|
|
@if (!ShowItems.Any())
|
|
|
|
{
|
|
|
|
<tr class="ant-table-placeholder">
|
|
|
|
<td colspan="6" class="ant-table-cell">
|
|
|
|
<Empty Simple />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
2020-05-30 01:46:41 +08:00
|
|
|
@if (_columns.Count > 0)
|
|
|
|
{
|
2020-06-02 19:15:15 +08:00
|
|
|
@foreach (var data in ShowItems)
|
2020-05-30 01:46:41 +08:00
|
|
|
{
|
|
|
|
<tr class="ant-table-row ant-table-row-level-0">
|
|
|
|
@ChildContent(data)
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
}
|
2020-06-02 19:15:15 +08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-05-30 01:46:41 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-02 19:15:15 +08:00
|
|
|
@if (ShowPagination && PaginationPosition.Contains("bottom"))
|
|
|
|
{
|
|
|
|
<Pagination Class="@PaginationClass" Total="_total" PageSize="_pageSize" @bind-Current="_current" />
|
|
|
|
}
|
|
|
|
</Spin>
|
|
|
|
</div>
|