2020-06-17 14:26:47 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
2020-12-16 13:24:27 +08:00
|
|
|
|
<div class="ant-collapse-header" @onclick="OnHeaderClick" role="button" aria-expanded="@(Active?"true":"false")">
|
2020-06-17 14:26:47 +08:00
|
|
|
|
@if (ShowArrow)
|
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (Collapse.ExpandIconTemplate != null)
|
2020-06-17 14:26:47 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@Collapse.ExpandIconTemplate(Active)
|
2020-06-17 14:26:47 +08:00
|
|
|
|
}
|
2020-09-16 13:58:16 +08:00
|
|
|
|
else
|
2020-06-17 14:26:47 +08:00
|
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
|
<Icon Type="@Collapse.ExpandIcon" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
|
2020-06-17 14:26:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (HeaderTemplate != null)@HeaderTemplate else @Header
|
2020-06-17 14:26:47 +08:00
|
|
|
|
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (Extra != null || ExtraTemplate != null)
|
2020-06-17 14:26:47 +08:00
|
|
|
|
{
|
|
|
|
|
<div class="ant-collapse-extra">
|
2020-09-16 13:58:16 +08:00
|
|
|
|
@if (ExtraTemplate != null)@ExtraTemplate else @Extra
|
2020-06-17 14:26:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2020-12-16 13:24:27 +08:00
|
|
|
|
<div class="ant-collapse-content @(Active?"ant-collapse-content-active":"ant-collapse-content-inactive ant-collapse-content-hidden")">
|
2020-06-17 14:26:47 +08:00
|
|
|
|
<div class="ant-collapse-content-box">
|
|
|
|
|
@ChildContent
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|