/// <summary> /// 添加菜单 /// </summary> /// <returns></returns> public MenuItemDefinition AddMenus() { #region 动态菜单 var modules = _moduleAppService.GetAll(); //获取所有的模块信息 var project = new MenuItemDefinition( //定义添加菜单的属性,这是一个主菜单,下面还有子菜单,所以没有URL "Business", L("Business"), icon: "menu", order: 5 //顺序 ); var list = modules.ToList(); //将模块信息装换成list格式 FillMenu(project, 0, list); //实现子菜单 return(project); //返回的是菜单 #endregion }
public MenuItemDefinition AddMenus() { #region 动态菜单 var modules = _moduleAppService.GetAll(); var project = new MenuItemDefinition( "Business", L("Business"), icon: "menu", order: 5 ); var list = modules.ToList(); FillMenu(project, 0, list); return(project); #endregion }