fix: 侧边栏链接支持 pathbase
This commit is contained in:
parent
4bb1612b3f
commit
1867653767
|
@ -9,6 +9,12 @@ namespace Bootstrap.Admin.Pages.Components
|
|||
/// </summary>
|
||||
public class SideBarBase : ComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得 NavigationManager 实例
|
||||
/// </summary>
|
||||
[Inject]
|
||||
public NavigationManager? NavigationManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 侧边栏绑定 Model 实例
|
||||
/// </summary>
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<aside class="@Model.ShowSideBar">
|
||||
<div class="bg"></div>
|
||||
<div class="nav-brand justify-content-center">
|
||||
<a href="@RootLayout.HomeUrl">
|
||||
<a href="@NavigationManager.ToBlazorLink(RootLayout.HomeUrl)">
|
||||
<img src="@Model.WebSiteLogo.ToBlazorLink()" />
|
||||
<span>@Model.Title</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-header flex-fill align-items-center">
|
||||
<a href="/Pages/Admin/Profiles">
|
||||
<img src="@Model.Icon.ToBlazorLink()" />
|
||||
<a href="@NavigationManager.ToBlazorLink("/Pages/Admin/Profiles")">
|
||||
<img src="@NavigationManager.ToBlazorLink(Model.Icon.ToBlazorLink())" />
|
||||
<span class="username d-inline-block text-truncate flex-fill">@DisplayName</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue