feat: 修复菜单导航
This commit is contained in:
parent
c7b385cd67
commit
25af048f77
|
@ -1,4 +1,4 @@
|
|||
@page "/Admin/Index"
|
||||
@attribute [TabItemOption(Text = "后台管理")]
|
||||
@attribute [TabItemOption(Text = "后台管理", Icon = "fa fa-cog")]
|
||||
|
||||
<h4>欢迎使用后台管理</h4>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@page "/Admin/Profiles"
|
||||
@attribute [TabItemOption(Text = "个人中心", Icon = "fa fa-suitcase")]
|
||||
|
||||
<div class="tab-scroll-body">
|
||||
<AdminCard HeaderText="基本资料" AuthorizeKey="SaveDisplayName">
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<span class="ms-3 flex-fill">Bootstrap of Blazor</span>
|
||||
<Logout ImageUrl="/images/Argo.png" DisplayName="@DisplayName" UserName="Admin">
|
||||
<LinkTemplate>
|
||||
<a href="/Admin/Profiles"><i class=" fa fa-suitcase"></i>个人中心</a>
|
||||
<a href="/Admin/Profiles"><i class="fa fa-suitcase"></i>个人中心</a>
|
||||
<a href="/Admin/Index"><i class="fa fa-cog"></i>设置</a>
|
||||
<a href="/Admin/Notifications"><i class="fa fa-bell"></i>通知<span id="logoutNoti" class="badge badge-pill badge-success"></span></a>
|
||||
<a href="/Account/Logout"><i class="fa fa-key"></i>注销</a>
|
||||
<a href="#" @onclick="OnLogout"><i class="fa fa-key"></i>注销</a>
|
||||
</LinkTemplate>
|
||||
</Logout>
|
||||
<div class="layout-drawer"><i class="fa fa-gears"></i></div>
|
||||
|
|
|
@ -13,6 +13,10 @@ namespace BootstrapAdmin.Web.Shared
|
|||
{
|
||||
private IEnumerable<MenuItem>? MenuItems { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private NavigationManager? NavigationManager { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private INavigation? NavigationsService { get; set; }
|
||||
|
@ -66,5 +70,7 @@ namespace BootstrapAdmin.Web.Shared
|
|||
}
|
||||
|
||||
private Task<bool> OnAuthorizing(string url) => SecurityService.AuhorizingNavigation(Context.UserName, url);
|
||||
|
||||
private void OnLogout() => NavigationManager.NavigateTo("/Account/Logout", true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue