diff --git a/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor b/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor index b2fca5a2..89e69c5b 100644 --- a/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor +++ b/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor @@ -2,7 +2,7 @@ + Menus="@Menus" UseTabSet="@UseTabSet" TabItemTextDictionary="@TabItemTextDictionary" AdditionalAssemblies="new[] { GetType().Assembly }" class="@Theme">
Bootstrap of Blazor @@ -35,6 +35,9 @@ Bootstrap Admin + + + diff --git a/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor.cs b/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor.cs index 4a46fc61..e853b53c 100644 --- a/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor.cs +++ b/src/blazor/Bootstrap.Client.Blazor.Shared/Shared/MainLayout.razor.cs @@ -49,27 +49,10 @@ namespace Bootstrap.Client.Blazor.Shared.Shared [NotNull] public string? UserName { get; private set; } - [NotNull] - private RenderFragment? NotAuthorized { get; set; } - [Inject] [NotNull] private AuthenticationStateProvider? AuthenticationStateProvider { get; set; } - /// - /// OnInitialized 方法 - /// - protected override void OnInitialized() - { - base.OnInitialized(); - - NotAuthorized = builder => - { - builder.OpenComponent(0); - builder.CloseComponent(); - }; - } - /// /// OnInitialized 方法 ///