2020-06-15 22:23:08 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
<CascadingValue Value="this">
|
|
|
|
|
@ChildContent
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
|
2020-07-16 14:28:42 +08:00
|
|
|
|
<div @ref="@_divRef" 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 -->
|
|
|
|
|
<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>
|
|
|
|
|
<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>
|
|
|
|
|
<td class="ant-descriptions-item-content" colspan="@item.realSpan * 2 - 1">
|
|
|
|
|
@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>
|