mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 21:47:38 +08:00
27 lines
501 B
C#
27 lines
501 B
C#
@using System.Net
|
|
@inject HtmlRenderService HtmlRenderService
|
|
|
|
|
|
@((MarkupString)text)
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
|
|
private string text { get; set; }
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
|
|
if (ChildContent != null)
|
|
{
|
|
text = await HtmlRenderService.RenderAsync(ChildContent);
|
|
text = WebUtility.HtmlDecode(text);
|
|
}
|
|
await base.OnInitializedAsync();
|
|
}
|
|
|
|
}
|