Улучшена адаптивность для телефонов. Добавлен новый ContextActionBarService
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
@implements IDisposable
|
||||
@inject ContextualActionBarService ContextualActionBarService
|
||||
|
||||
@code {
|
||||
[Parameter] public bool Bottom { get; set; } = false;
|
||||
[Parameter] public RenderFragment? ChildContent { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
bool isChanged = false;
|
||||
|
||||
if (ContextualActionBarService.Content != ChildContent)
|
||||
{
|
||||
ContextualActionBarService.Content = ChildContent;
|
||||
isChanged = true;
|
||||
}
|
||||
|
||||
if (ContextualActionBarService.Bottom != Bottom)
|
||||
{
|
||||
ContextualActionBarService.Bottom = Bottom;
|
||||
isChanged = true;
|
||||
}
|
||||
|
||||
if (isChanged) ContextualActionBarService.ChangeParameters();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ContextualActionBarService.Content = null;
|
||||
ContextualActionBarService.Bottom = null;
|
||||
ContextualActionBarService.ChangeParameters();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user