mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
3d4f7adaaf
* fix(module:overlay): move postion calculation to js fixes #1836 * docs: TriggerBoundaryAdjustMode explanation * docs: select & datepicker got BoundaryAdjustmetMode cleanup * test: fixes optimization & cleanup * fix(module:overlay): recalculate overlay position when trigger resizes * Minor clean-up * fix(module:overlay): wait for Show to finish in Hide * fix: prevent vertical scrollbar on overlay adding * fix: extract waiting function * fix: overlay not to repostion when trigger vanishes (menu issue) * fix: scroll adjustment for position: fixed * fix: on menu mode change, keep * merge conflict fix * fix: nominal calculation reset on failed adjustment * fix: bugs * test: exclude log method from test coverage in overlay.ts
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
<header id="header" class="clearfix @(IsHome?"home-header":"")">
|
|
<Row Style="flex-flow: nowrap; height: 64px;" OnBreakpoint="OnBreakpoint">
|
|
<GridCol Xs="24" Sm="24" Md="6" Lg="6" Xl="5" Xxl="4">
|
|
<h1>
|
|
<a id="logo" href="/">
|
|
<img alt="logo" src="/docs/assets/logo.svg">Ant Design Blazor
|
|
</a>
|
|
</h1>
|
|
</GridCol>
|
|
@if (_isMobile)
|
|
{
|
|
<Dropdown Placement="Placement.BottomRight" Trigger="new[] { Trigger.Click }">
|
|
<Overlay>
|
|
<HeaderMenu IsMobile />
|
|
</Overlay>
|
|
<ChildContent>
|
|
<Icon Type="unordered-list" Class="nav-phone-icon" />
|
|
</ChildContent>
|
|
</Dropdown>
|
|
}
|
|
@if (!_isMobile)
|
|
{
|
|
<GridCol Class="menu-row" Xs="0" Sm="0" Md="18" Lg="18" Xl="19" Xxl="20">
|
|
<HeaderMenu IsMobile="false" />
|
|
</GridCol>
|
|
}
|
|
</Row>
|
|
</header>
|
|
|
|
@code {
|
|
public bool _isMobile;
|
|
|
|
[Parameter] public bool IsHome { get; set; }
|
|
|
|
[Parameter] public EventCallback<bool> OnMobileModeChanged { get; set; }
|
|
|
|
private void OnBreakpoint(BreakpointType breakpoint)
|
|
{
|
|
_isMobile = breakpoint.IsIn(BreakpointType.Sm, BreakpointType.Xs, BreakpointType.Md);
|
|
if (OnMobileModeChanged.HasDelegate)
|
|
{
|
|
OnMobileModeChanged.InvokeAsync(_isMobile);
|
|
}
|
|
}
|
|
}
|