mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
78b10019e4
* feat(module:table): virtualizing * turn off virtualizing by default * add document and demo * NET_6_0 => NET6_0 * update table selection * update Table.razor.cs * update table files * Update table files * update table files * update table files * update table files * update table files * update table files * update table files * update Virtualizing.razor * Update AntDesign.csproj * Update TableRow.razor * update files * Update AntDesign.csproj * update table files * update Virtualizing.razor * add DefaultExpandMaxLevel * rename Virtualizing to EnableVirtualization Co-authored-by: James Yeung <shunjiey@hotmail.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItem
|
|
@using AntDesign.TableModels
|
|
|
|
@if (IsBody)
|
|
{
|
|
<tr @attributes="RowAttributes"
|
|
data-row-key="@(RowData.RowIndex-1)"
|
|
class="ant-table-row ant-table-row-level-@RowData.Level @(RowData.Selected ? "ant-table-row-selected" : "") @RowClassName @RowAttributes?.GetValueOrDefault("class")">
|
|
@ChildContent
|
|
</tr>
|
|
}
|
|
else if (IsHeader)
|
|
{
|
|
<tr @attributes="RowAttributes">
|
|
@ChildContent
|
|
</tr>
|
|
}
|
|
|
|
@code {
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
[CascadingParameter(Name = "IsHeader")]
|
|
public bool IsHeader { get; set; }
|
|
|
|
[CascadingParameter(Name = "IsBody")]
|
|
public bool IsBody { get; set; }
|
|
|
|
[CascadingParameter(Name = "RowData")]
|
|
public RowData<TItem> RowData { get; set; }
|
|
|
|
[CascadingParameter(Name = "AntDesign.TableRow.RowAttributes")]
|
|
public Dictionary<string, object> RowAttributes { get; set; }
|
|
|
|
[CascadingParameter(Name = "AntDesign.TableRow.RowClassName")]
|
|
public string RowClassName { get; set; }
|
|
}
|