@code { ///
/// ///
/// private Task OnClickParameter() { DialogService?.Show(new DialogOption() { Title = "自带的 Counter 组件", BodyContext = "我是传参", BodyTemplate = builder => { var index = 0; builder.OpenComponent(index++); builder.CloseComponent(); } }); return Task.CompletedTask; } } DemoComponent 代码 @code {
@Parameter
@code { [CascadingParameter(Name = "BodyContext")] private object? Parameter { get; set; } } }