Skip to content

Commit d1d17c6

Browse files
committed
feat: 增加级联参数
1 parent 9874e83 commit d1d17c6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/BootstrapBlazor/Components/Toast/Toast.razor

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
</div>
2525
}
2626
<div class="toast-body">
27-
@if (Options.ChildContent != null)
28-
{
29-
@Options.ChildContent
30-
}
31-
else if (!string.IsNullOrEmpty(Options.Content))
32-
{
33-
@((MarkupString)Options.Content)
34-
}
27+
<CascadingValue Value="Close" IsFixed="true">
28+
@if (Options.ChildContent != null)
29+
{
30+
@Options.ChildContent
31+
}
32+
else if (!string.IsNullOrEmpty(Options.Content))
33+
{
34+
@((MarkupString)Options.Content)
35+
}
36+
</CascadingValue>
3537
</div>
3638
<div class="@ProgressClass"></div>
3739
</div>

0 commit comments

Comments
 (0)