mirror of https://github.com/abpframework/abp
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.
23 lines
651 B
23 lines
651 B
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Volo.Abp.UI.Navigation;
|
|
|
|
namespace AbpDesk.Web.Mvc.Views.Shared.Components.Menu
|
|
{
|
|
public class MenuViewComponent : ViewComponent
|
|
{
|
|
private readonly IMenuManager _menuManager;
|
|
|
|
public MenuViewComponent(IMenuManager menuManager)
|
|
{
|
|
_menuManager = menuManager;
|
|
}
|
|
|
|
public async Task<IViewComponentResult> InvokeAsync(string menuName = StandardMenus.Main, string viewName = "Default")
|
|
{
|
|
var menu = await _menuManager.GetAsync(StandardMenus.Main);
|
|
return View(viewName, menu);
|
|
}
|
|
}
|
|
}
|