mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 08:51:27 +08:00
8f00e1d393
* feat: drawer support return value * feat: drawer supports return value * feat: drawer support return value * feat: drawer support return value * docs: avoid duplicate names * fix: demo Co-authored-by: ElderJames <shunjiey@hotmail.com>
52 lines
1.9 KiB
C#
52 lines
1.9 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
<div class="@ClassMapper.Class" @ref="@Ref" style="@_drawerStyle @Style" id="@Id">
|
|
@if (Mask)
|
|
{
|
|
<div class="ant-drawer-mask" @onclick="_=>MaskClick()" style="@MaskStyle"></div>
|
|
}
|
|
<div class="ant-drawer-content-wrapper @WrapClassName " style="@WrapperStyle">
|
|
<div class="ant-drawer-content">
|
|
<div class="ant-drawer-wrapper-body" style="@(IsLeftOrRight?"height:100%":"")">
|
|
@if (_title.Value != null || Closable)
|
|
{
|
|
|
|
<div class="@TitleClassMapper.Class">
|
|
@if (_title.Value != null)
|
|
{
|
|
<div class="ant-drawer-title">
|
|
@if (TitleTemplate != null)
|
|
{
|
|
@TitleTemplate
|
|
}
|
|
@if (!string.IsNullOrEmpty(TitleString))
|
|
{
|
|
@((MarkupString)TitleString)
|
|
}
|
|
</div>
|
|
}
|
|
@if (Closable)
|
|
{
|
|
<button @onclick="_=>CloseClick()" aria-label="Close" class="ant-drawer-close">
|
|
<Icon Type="close"/>
|
|
</button>
|
|
}
|
|
</div>
|
|
}
|
|
<div class="ant-drawer-body" style="@BodyStyle">
|
|
@if (ContentTemplate != null)
|
|
{
|
|
@ContentTemplate
|
|
}
|
|
@if (string.IsNullOrEmpty(ContentString))
|
|
{
|
|
@((MarkupString)ContentString)
|
|
}
|
|
@ChildContent
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|