mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
90690fba01
* feat: add layout demo * feat: add some of layout demos
51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
@namespace AntBlazor
|
|
@inherits AntDomComponentBase
|
|
|
|
<CascadingValue Value="this">
|
|
<aside class="@ClassMapper.Class" @ref="Ref" style="@InternalStyle @Style" id="@Id">
|
|
@if (IsZeroTrigger)
|
|
{
|
|
<span class="ant-layout-sider-zero-width-trigger" @onclick="ToggleCollapse">
|
|
@if (ZeroTrigger != null)
|
|
{
|
|
@ZeroTrigger
|
|
}
|
|
else
|
|
{
|
|
<AntIcon Type="bars"></AntIcon>
|
|
}
|
|
</span>
|
|
}
|
|
|
|
<div class="ant-layout-sider-children">
|
|
@ChildContent
|
|
</div>
|
|
|
|
@if (IsSiderTrigger)
|
|
{
|
|
<div class="ant-layout-sider-trigger"
|
|
@onclick="ToggleCollapse"
|
|
style="width: @WidthSetting">
|
|
@SiderTrigger
|
|
</div>
|
|
}
|
|
</aside>
|
|
</CascadingValue>
|
|
|
|
@code {
|
|
|
|
|
|
private RenderFragment<Sider> defaultTrigger = (sider) =>
|
|
@<Template>
|
|
@if (!sider.ReverseArrow)
|
|
{
|
|
<AntIcon Type="@(sider.Collapsed ? "right" : "left")"></AntIcon>
|
|
}
|
|
else
|
|
{
|
|
<AntIcon Type="@(sider.Collapsed ? "left" : "right")"></AntIcon>
|
|
}
|
|
</Template>;
|
|
|
|
}
|