doc: 增加SubNavItemLink公用视图
This commit is contained in:
parent
290a41427c
commit
ff635952b8
|
@ -1,21 +1,22 @@
|
||||||
@model Bootstrap.Security.BootstrapMenu
|
@model Bootstrap.Security.BootstrapMenu
|
||||||
@if(Model.Menus.Any())
|
@if(Model.Menus.Any())
|
||||||
{
|
{
|
||||||
<li class="nav-item has-treeview">
|
if(@Model.Active == "active")
|
||||||
<a href="@Url.Content(Model.Url)" class="nav-link @Model.Active" target="@Model.Target"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span><i class="fa fa-angle-left"></i></a>
|
|
||||||
@if (Model.Menus.Any())
|
|
||||||
{
|
{
|
||||||
@await Html.PartialAsync("SubNavigation", Model.Menus)
|
<li class="nav-item has-treeview menu-open">
|
||||||
}
|
@await Html.PartialAsync("SubNavItemLink", Model)
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
<li class="nav-item has-treeview">
|
||||||
|
@await Html.PartialAsync("SubNavItemLink", Model)
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="@Url.Content(Model.Url)" class="nav-link @Model.Active" target="@Model.Target"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span></a>
|
<a href="@Url.Content(Model.Url)" class="nav-link @Model.Active" target="@Model.Target"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span></a>
|
||||||
@if (Model.Menus.Any())
|
|
||||||
{
|
|
||||||
@await Html.PartialAsync("SubNavigation", Model.Menus)
|
|
||||||
}
|
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
@model Bootstrap.Security.BootstrapMenu
|
||||||
|
<a href="@Url.Content(Model.Url)" class="nav-link @Model.Active" target="@Model.Target"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span><i class="fa fa-angle-left"></i></a>
|
||||||
|
@if (Model.Menus.Any())
|
||||||
|
{
|
||||||
|
@await Html.PartialAsync("SubNavigation", Model.Menus)
|
||||||
|
}
|
Loading…
Reference in New Issue