mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
34 lines
610 B
C#
34 lines
610 B
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
<CascadingValue Value="this">
|
|
<section class="@ClassMapper.Class" style="@Style" id="@Id">
|
|
@ChildContent
|
|
</section>
|
|
</CascadingValue>
|
|
|
|
@code
|
|
{
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
private bool _hasSider;
|
|
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
ClassMapper
|
|
.Add("ant-layout")
|
|
.If("ant-layout-has-sider", () => _hasSider);
|
|
}
|
|
|
|
internal void HasSider()
|
|
{
|
|
_hasSider = true;
|
|
StateHasChanged();
|
|
}
|
|
|
|
}
|