ant-design-blazor/components/breadcrumb/Breadcrumb.razor.cs
James Yeung 90690fba01 docs: add some of layout demos (#138)
* feat: add layout demo

* feat: add some of layout demos
2020-05-22 00:05:26 +08:00

52 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Components;
namespace AntBlazor
{
public partial class Breadcrumb : AntDomComponentBase
{
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public bool AutoGenerate { get; set; } = false;
[Parameter]
public string Separator { get; set; } = "/";
[Parameter]
public string RouteLabel { get; set; } = "breadcrumb";
[Inject]
public NavigationManager NavigationManager { get; set; }
private readonly BreadcrumbOption[] _breadcrumbs = Array.Empty<BreadcrumbOption>();
private void Navigate(string url)
{
NavigationManager.NavigateTo(url);
}
protected override void OnInitialized()
{
this.ClassMapper.Add("ant-breadcrumb");
base.OnInitialized();
}
private void RegisterRouterChange()
{
}
}
public class BreadcrumbOption
{
public string Label { get; set; }
public Dictionary<string, object> Params { get; set; }
public Uri Url { get; set; }
}
}