@code { private static IEnumerable GetIconItems() { var ret = new List { new TreeItem() { Text = "导航一", Icon = "fa fa-fa fa-fw" }, new TreeItem() { Text = "导航二", Icon = "fa fa-fa fa-fw" }, new TreeItem() { Text = "导航三", Icon = "fa fa-fa fa-fw" } }; ret[1].AddItem(new TreeItem() { Text = "子菜单一", Icon = "fa fa-fa fa-fw" }); ret[1].AddItem(new TreeItem() { Text = "子菜单二", Icon = "fa fa-fa fa-fw" }); ret[1].AddItem(new TreeItem() { Text = "子菜单三", Icon = "fa fa-fa fa-fw" }); return ret; } }