2020-06-19 23:06:33 +08:00
|
|
|
|
@namespace AntDesign
|
2021-09-02 12:34:30 +08:00
|
|
|
|
@using AntDesign.TableModels
|
2020-06-19 23:06:33 +08:00
|
|
|
|
@inherits ColumnBase
|
|
|
|
|
|
2021-01-09 23:57:31 +08:00
|
|
|
|
@if (IsInitialize)
|
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
return;
|
2021-01-09 23:57:31 +08:00
|
|
|
|
}
|
|
|
|
|
else if (IsPlaceholder)
|
2020-06-19 23:06:33 +08:00
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
<td style="padding: 0px; border: 0px; height: 0px;"></td>
|
2020-06-19 23:06:33 +08:00
|
|
|
|
}
|
2021-01-09 23:57:31 +08:00
|
|
|
|
else if (IsMeasure)
|
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
<td style="padding: 0px; border: 0px; height: 0px;"><div style="height: 0px; overflow: hidden;"> </div></td>
|
2021-01-09 23:57:31 +08:00
|
|
|
|
}
|
2020-06-19 23:06:33 +08:00
|
|
|
|
else if (IsColGroup)
|
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
if (Width != null)
|
|
|
|
|
{
|
|
|
|
|
<col class="ant-table-selection-col" style="width: @((CssSizeLength)Width); min-width: @((CssSizeLength)Width);">
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<col class="ant-table-selection-col">
|
|
|
|
|
}
|
2020-06-19 23:06:33 +08:00
|
|
|
|
}
|
2020-09-28 16:06:02 +08:00
|
|
|
|
else if (IsHeader && HeaderColSpan != 0)
|
2020-06-19 23:06:33 +08:00
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
<th class="@ClassMapper.Class ant-table-selection-column" style="@FixedStyle @HeaderStyle" @key="@Key" colspan="@HeaderColSpan">
|
|
|
|
|
@if (Type == "checkbox")
|
|
|
|
|
{
|
2022-09-24 13:13:07 +08:00
|
|
|
|
<Checkbox Checked="Table.AllSelected" CheckedChange="OnCheckedChange" Indeterminate="Indeterminate" Disabled="IsHeaderDisabled" />
|
2021-09-02 12:34:30 +08:00
|
|
|
|
}
|
|
|
|
|
</th>
|
|
|
|
|
}
|
2020-11-03 13:31:22 +08:00
|
|
|
|
else if (!IsHeader && RowSpan != 0 && ColSpan != 0)
|
2020-06-19 23:06:33 +08:00
|
|
|
|
{
|
2021-09-02 12:34:30 +08:00
|
|
|
|
<td class="@ClassMapper.Class ant-table-selection-column" style="@FixedStyle @Style" @key="@Key" rowspan="@RowSpan" colspan="@ColSpan">
|
|
|
|
|
|
|
|
|
|
@if (CellRender != null)
|
|
|
|
|
{
|
|
|
|
|
var cellData = new CellData(RowData);
|
|
|
|
|
@CellRender(cellData)
|
|
|
|
|
}
|
|
|
|
|
else if (ChildContent != null)
|
|
|
|
|
{
|
|
|
|
|
@ChildContent
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@if (Type == "checkbox")
|
|
|
|
|
{
|
2022-09-22 11:51:40 +08:00
|
|
|
|
<Checkbox Checked="RowData.Selected" Disabled="Disabled" CheckedChange="OnCheckedChange" />
|
2021-09-02 12:34:30 +08:00
|
|
|
|
}
|
|
|
|
|
else if (Type == "radio")
|
|
|
|
|
{
|
2022-09-22 11:51:40 +08:00
|
|
|
|
<Radio Checked="RowData.Selected" Disabled="Disabled" CheckedChange="OnCheckedChange" TValue="bool" />
|
2021-09-02 12:34:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</td>
|
2020-06-19 23:06:33 +08:00
|
|
|
|
}
|