mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
d2e9c4b247
* feat(module: config-provider): support RTL * add rtl for each component * fix rtl for pagination * add rtl for overlay
35 lines
671 B
C#
35 lines
671 B
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
<CascadingValue Value="this" IsFixed="@true">
|
|
<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)
|
|
.If("ant-layout-rtl", () => RTL);
|
|
}
|
|
|
|
internal void HasSider()
|
|
{
|
|
_hasSider = true;
|
|
StateHasChanged();
|
|
}
|
|
|
|
}
|