ant-design-blazor/components/page-header/PageHeader.razor
TimChen 3d23cfd5c1 fix(module: pageheader): onback icon (#544)
* feat: fix pageheader onbackicon

* docs: pageheader doc

* docs: pageheader

* fix: anchor _flatLinks is null bug

* fix: custom icon

* fix: custom icon and statictic value converting

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-08-31 11:51:11 +08:00

113 lines
3.0 KiB
C#

@namespace AntDesign
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" style="@Style" id="@Id">
@PageHeaderBreadcrumb
<div class="ant-page-header-heading">
<div class="ant-page-header-heading-left">
<!--back-->
@if (BackIcon.Value != null || OnBack.HasDelegate)
{
<div @onclick="OnBackClick" class="ant-page-header-back">
<div role="button" tabindex="0" class="ant-page-header-back-button">
@if (BackIcon.IsT0)
{
<Icon Type="arrow-left" Theme="outline" />
}
else if (BackIcon.IsT1)
{
<Icon Type="@BackIcon.AsT1" Theme="outline" />
}
else
{
@BackIcon.AsT2
}
</div>
</div>
}
<!--avatar-->
@PageHeaderAvatar
<!--title-->
@if (Title.Value != null)
{
<span class="ant-page-header-heading-title">
@if (Title.IsT0)
{
@Title.AsT0
}
else
{
@Title.AsT1
}
</span>
}
else
{
if (PageHeaderTitle != null)
{
<div class="ant-page-header-heading-title">
@PageHeaderTitle
</div>
}
}
<!--subtitle-->
@if (Subtitle.Value != null)
{
<span class="ant-page-header-heading-sub-title">
@if (Subtitle.IsT0)
{
@Subtitle.AsT0
}
else
{
@Subtitle.AsT1
}
</span>
}
else
{
if (PageHeaderSubtitle != null)
{
<div class="ant-page-header-heading-sub-title">
@PageHeaderSubtitle
</div>
}
}
@if (PageHeaderTags != null)
{
<div class="ant-page-header-heading-tags">
@PageHeaderTags
</div>
}
</div>
@if (PageHeaderExtra != null)
{
<div class="ant-page-header-heading-extra">
@PageHeaderExtra
</div>
}
</div>
@if (PageHeaderContent != null)
{
<div class="ant-page-header-content">
@PageHeaderContent
</div>
}
@if (PageHeaderFooter != null)
{
<div class="ant-page-header-footer">
@PageHeaderFooter
</div>
}
</div>