2020-06-15 22:23:08 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
<CascadingValue Value="this">
|
|
|
|
|
@ChildContent
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<div @ref="@Ref" class="@ClassMapper.Class" style="@Style" id="@Id">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (Title != null || TitleTemplate != null)
|
2020-06-15 22:23:08 +08:00
|
|
|
|
{
|
|
|
|
|
<div class="ant-descriptions-title">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
2020-06-15 22:23:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
<div class="ant-descriptions-view">
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
@if (Layout == DescriptionsLayout.Horizontal)
|
|
|
|
|
{
|
|
|
|
|
foreach (var row in this._itemMatrix)
|
|
|
|
|
{
|
|
|
|
|
<tr class="ant-descriptions-row">
|
|
|
|
|
@foreach (var item in row)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (Bordered == false)
|
|
|
|
|
{
|
|
|
|
|
<!-- Horizontal & NOT Bordered -->
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<td class="ant-descriptions-item" colspan="@item.realSpan" @ref="@item.item.Ref">
|
2020-06-15 22:23:08 +08:00
|
|
|
|
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
|
|
|
|
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
2020-06-15 22:23:08 +08:00
|
|
|
|
</span>
|
|
|
|
|
<span class="ant-descriptions-item-content">
|
|
|
|
|
@item.item.ChildContent
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<!-- Horizontal & Bordered -->
|
|
|
|
|
<td class="ant-descriptions-item-label">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
2020-06-15 22:23:08 +08:00
|
|
|
|
</td>
|
2020-12-22 10:24:09 +08:00
|
|
|
|
<td class="ant-descriptions-item-content" colspan="@(item.realSpan * 2 - 1)">
|
2020-06-15 22:23:08 +08:00
|
|
|
|
@item.item.ChildContent
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Layout == DescriptionsLayout.Vertical)
|
|
|
|
|
{
|
|
|
|
|
if (Bordered == false)
|
|
|
|
|
{
|
|
|
|
|
<!-- Vertical & NOT Bordered -->
|
|
|
|
|
foreach (var row in this._itemMatrix)
|
|
|
|
|
{
|
|
|
|
|
<tr class="ant-descriptions-row">
|
|
|
|
|
@foreach (var item in row)
|
|
|
|
|
{
|
|
|
|
|
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
|
|
|
|
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
2020-06-15 22:23:08 +08:00
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="ant-descriptions-row">
|
|
|
|
|
@foreach (var item in row)
|
|
|
|
|
{
|
|
|
|
|
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
|
|
|
|
<span class="ant-descriptions-item-content">
|
|
|
|
|
@item.item.ChildContent
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<!-- Vertical & Bordered -->
|
|
|
|
|
foreach (var row in this._itemMatrix)
|
|
|
|
|
{
|
|
|
|
|
<tr class="ant-descriptions-row">
|
|
|
|
|
@foreach (var item in row)
|
|
|
|
|
{
|
|
|
|
|
<td class="ant-descriptions-item-label" colspan="@item.realSpan">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
2020-06-15 22:23:08 +08:00
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="ant-descriptions-row">
|
|
|
|
|
@foreach (var item in row)
|
|
|
|
|
{
|
|
|
|
|
<td class="ant-descriptions-item-content" colspan="@item.realSpan">
|
|
|
|
|
@item.item.ChildContent
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|