Skip to content

Commit 496004b

Browse files
authored
feat(ExportPdfButton): update AutoDownload default value to true (#5973)
* doc: 更新文档说明 * refactor: 更改 AutoDownload 参数默认值
1 parent e2ff294 commit 496004b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ private AttributeItem[] GetAttributes() =>
9494
{
9595
Name = nameof(ExportPdfButton.AutoDownload),
9696
Description = Localizer["AttributeAutoDownload"],
97-
Type = "string?",
98-
ValueList = "",
99-
DefaultValue = ""
97+
Type = "bool",
98+
ValueList = "true|false",
99+
DefaultValue = "true"
100100
},
101101
new()
102102
{

src/BootstrapBlazor/Components/Button/ExportPdfButton.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public class ExportPdfButton : Button
5959
public Func<string, Task>? OnAfterDownload { get; set; }
6060

6161
/// <summary>
62-
/// 获得/设置 是否自动下载 Pdf 默认为 false
62+
/// 获得/设置 是否自动下载 Pdf 默认为 true
6363
/// </summary>
6464
[Parameter]
65-
public bool AutoDownload { get; set; }
65+
public bool AutoDownload { get; set; } = true;
6666

6767
[Inject, NotNull]
6868
private IHtml2Pdf? Html2PdfService { get; set; }

0 commit comments

Comments
 (0)