2020-06-30 15:25:21 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<CascadingValue Value="this" IsFixed="@true">
|
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
|
2020-06-30 15:25:21 +08:00
|
|
|
|
<div class="ant-comment-inner">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if ((Avatar != null || AvatarTemplate != null) && (Content != null || ContentTemplate != null))
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
<div class="ant-comment-avatar">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (AvatarTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@AvatarTemplate
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
<Avatar Src="@Avatar" />
|
|
|
|
|
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-comment-content">
|
|
|
|
|
<div class="ant-comment-content-author">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (Author != null || AuthorTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
<span class="ant-comment-content-author-name">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
|
|
|
|
|
@if (AuthorTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@AuthorTemplate
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
<a>@Author</a>
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
}
|
2020-09-16 13:58:16 +08:00
|
|
|
|
|
|
|
|
|
@if (Datetime != null || DatetimeTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
<span class="ant-comment-content-author-time">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (DatetimeTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@DatetimeTemplate
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
<span>@Datetime</span>
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-comment-content-detail">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (ContentTemplate != null)
|
2020-06-30 15:25:21 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@ContentTemplate
|
|
|
|
|
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
<p>@Content</p>
|
2020-06-30 15:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
@if (Actions.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
<ul class="ant-comment-actions">
|
|
|
|
|
@foreach (RenderFragment action in Actions)
|
|
|
|
|
{
|
|
|
|
|
<li>@action</li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-comment-nested">
|
|
|
|
|
@ChildContent
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</CascadingValue>
|