本例中 导航二 节点为禁用状态，菜单与其子菜单均不可点击

侧栏的禁用示例

@code { private IEnumerable DisabledMenuItems { get; set; } = Enumerable.Empty(); private IEnumerable GetDisabledMenuItems() { var ret = new List { new MenuItem() { Text = "导航一", IsActive = true }, new MenuItem() { Text = "导航二", IsDisabled = true }, new MenuItem() { Text = "导航三" }, new MenuItem() { Text = "导航四", IsDisabled = true }, }; ret[1].AddItem(new MenuItem() { Text = "子菜单一", Icon = "fa fa-fa fa-fw" }); ret[2].AddItem(new MenuItem() { Text = "子菜单二", Icon = "fa fa-fa fa-fw" }); ret[2].AddItem(new MenuItem() { Text = "子菜单三", Icon = "fa fa-fa fa-fw", IsDisabled = true }); return ret; } protected override void OnInitialized() { base.OnInitialized(); DisabledMenuItems = GetDisabledMenuItems(); } }