CascadingTypeParameter
根據上階元件推斷泛型型別(Infer generic types based on ancestor components),CascadingTypeParameterAttribute
範例碼
@attribute [CascadingTypeParameter(nameof(TLineData))]
@typeparam TLineData
...
@code {
[Parameter]
public IEnumerable<TLineData> Data { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
}c範例碼二
參考文章
Last updated