diff --git a/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs b/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs index f3d2eaf2f83..598990e412d 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs @@ -48,6 +48,13 @@ public class SwalOption : PopupOptionBase /// public RenderFragment? BodyTemplate { get; set; } + /// + /// 获得/设置 Footer 文本字符串 + /// Gets or sets Footer content string + /// v10.5.0 + /// + public string? Footer { get; set; } + /// /// 获得/设置 Footer 组件 /// Gets or sets Footer Component diff --git a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor index 2c210a27289..d56e857123c 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor +++ b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor @@ -1,4 +1,4 @@ -@namespace BootstrapBlazor.Components +@namespace BootstrapBlazor.Components @inherits BootstrapComponentBase
@@ -70,6 +70,13 @@ else @if (ShowFooter) { } diff --git a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs index 0d199ee4d83..950c12ba600 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs @@ -122,6 +122,14 @@ public partial class SweetAlertBody [Parameter] public RenderFragment? BodyTemplate { get; set; } + /// + /// 获得/设置 Footer 文本字符串 + /// Gets or sets Footer content string + /// v10.5.0 + /// + [Parameter] + public string? Footer { get; set; } + /// /// 获得/设置 Footer 模板 /// Gets or sets Footer Template diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index 7195dde4b24..a4223f94d00 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -735,10 +735,6 @@ public async Task ExpandDetailRow(TItem item) /// 获得/设置 是否自动刷新表格 默认为 false /// Gets or sets Whether to auto refresh. Default false /// - /// - /// 此参数在 模式下不生效 - /// Not effective in mode - /// [Parameter] public bool IsAutoRefresh { get; set; } diff --git a/src/BootstrapBlazor/Extensions/SwalExtensions.cs b/src/BootstrapBlazor/Extensions/SwalExtensions.cs index ffb4870a5a6..b68b9f4634b 100644 --- a/src/BootstrapBlazor/Extensions/SwalExtensions.cs +++ b/src/BootstrapBlazor/Extensions/SwalExtensions.cs @@ -61,6 +61,7 @@ public static async Task ShowModal(this SwalService service, SwalOption op [nameof(SweetAlertBody.Title)] = option.Title, [nameof(SweetAlertBody.Content)] = option.Content, [nameof(SweetAlertBody.BodyTemplate)] = option.BodyTemplate, + [nameof(SweetAlertBody.Footer)] = option.Footer, [nameof(SweetAlertBody.FooterTemplate)] = option.FooterTemplate, [nameof(SweetAlertBody.ButtonTemplate)] = option.ButtonTemplate, [nameof(SweetAlertBody.CloseButtonIcon)] = option.CloseButtonIcon, diff --git a/test/UnitTest/Components/SwalTest.cs b/test/UnitTest/Components/SwalTest.cs index 4e95364b545..8a090868806 100644 --- a/test/UnitTest/Components/SwalTest.cs +++ b/test/UnitTest/Components/SwalTest.cs @@ -55,9 +55,12 @@ public void Show_Ok() cut.InvokeAsync(() => swal.Show(new SwalOption() { Content = "I am Eror", - Category = SwalCategory.Information + Category = SwalCategory.Information, + ShowFooter = true, + Footer = "I am Footer" })); Assert.Contains("swal2-info", cut.Markup); + Assert.Contains("I am Footer", cut.Markup); cut.InvokeAsync(() => modal.Instance.CloseCallback()); // 测试 Category