You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/Infrastructure/Views/Account/_Menu.cshtml

22 lines
707 B

<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<li class="nav-link">
<a class="nav-link @GetClass("Index")" href="@Url.Action("Index")">
<i class="far fa-circle nav-icon"></i>
<p>用户中心</p>
</a>
</li>
</ul>
@functions{
public string GetClass(params string[] controllers)
{
if (controllers.Select(o => o.ToLower()).Contains(this.ViewContext.RouteData.Values["controller"].ToString().ToLower()))
{
if (controllers.Length > 1)
{
return "active open";
}
return "active";
}
return "";
}
}