diff --git a/src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor.cs index fbad4619f87..f032a2c6f5c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor.cs @@ -94,9 +94,9 @@ private AttributeItem[] GetAttributes() => { Name = nameof(ExportPdfButton.AutoDownload), Description = Localizer["AttributeAutoDownload"], - Type = "string?", - ValueList = " — ", - DefaultValue = " — " + Type = "bool", + ValueList = "true|false", + DefaultValue = "true" }, new() { diff --git a/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs b/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs index 2a9c433b591..1eb493a5f40 100644 --- a/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs +++ b/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs @@ -59,10 +59,10 @@ public class ExportPdfButton : Button public Func? OnAfterDownload { get; set; } /// - /// 获得/设置 是否自动下载 Pdf 默认为 false + /// 获得/设置 是否自动下载 Pdf 默认为 true /// [Parameter] - public bool AutoDownload { get; set; } + public bool AutoDownload { get; set; } = true; [Inject, NotNull] private IHtml2Pdf? Html2PdfService { get; set; }