diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 277f6ba5401..dc35f60e90f 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 9.5.8-beta01 + 9.5.8 diff --git a/src/BootstrapBlazor/Options/TableExportOptions.cs b/src/BootstrapBlazor/Options/TableExportOptions.cs index 8c22cf0884f..fd4ce446bc0 100644 --- a/src/BootstrapBlazor/Options/TableExportOptions.cs +++ b/src/BootstrapBlazor/Options/TableExportOptions.cs @@ -8,34 +8,45 @@ namespace BootstrapBlazor.Components; /// -/// Table 导出 Excel 配置类 +/// Configuration class for exporting tables to Excel /// public class TableExportOptions { /// - /// 获得/设置 是否使用格式化 默认 true 如果设置 或者 后使用格式化值 + /// Gets or sets whether to use formatting. Default is true. + /// If or is set, the formatted value will be used. /// - /// 注意格式化后返回值是 string 会导致原始值类型改变 + /// Note: After formatting, the returned value is a string, which may change the original value type. public bool EnableFormat { get; set; } = true; /// - /// 获得/设置 是否使用 Lookup 默认 true + /// Gets or sets whether to use Lookup. Default is true. /// public bool EnableLookup { get; set; } = true; /// - /// 获得/设置 是否将数组类型值进行合并操作 默认 true + /// Gets or sets whether to merge array-type values. Default is true. /// public bool AutoMergeArray { get; set; } = true; /// - /// 获得/设置 是否使用枚举类型的 标签 默认 true + /// Gets or sets whether to use the tag for enum types. Default is true. /// public bool UseEnumDescription { get; set; } = true; /// - /// 获得/设置 数组类型合并操作时使用的分隔符 默认使用逗号 + /// Gets or sets the delimiter used when merging array-type values. Default is a comma. /// - /// 注意格式化后返回值是 string 会导致原始值类型改变 + /// Note: After formatting, the returned value is a string, which may change the original value type. public string ArrayDelimiter { get; set; } = ","; + + /// + /// Gets or sets whether to enable Excel auto-filtering. Default is true. + /// + public bool EnableAutoFilter { get; set; } = true; + + /// + /// Gets or sets whether to enable Excel auto-width. Default is false. + /// + public bool EnableAutoWidth { get; set; } } diff --git a/test/UnitTest/Options/BootstrapBlazorOptionsTest.cs b/test/UnitTest/Options/BootstrapBlazorOptionsTest.cs index a029782a162..2aa27e3d556 100644 --- a/test/UnitTest/Options/BootstrapBlazorOptionsTest.cs +++ b/test/UnitTest/Options/BootstrapBlazorOptionsTest.cs @@ -95,11 +95,15 @@ public void Options_TableExportOptions() exportOptions.AutoMergeArray = false; exportOptions.ArrayDelimiter = ","; exportOptions.UseEnumDescription = false; + exportOptions.EnableAutoFilter = false; + exportOptions.EnableAutoWidth = false; Assert.False(exportOptions.EnableLookup); Assert.False(exportOptions.EnableFormat); Assert.False(exportOptions.AutoMergeArray); Assert.False(exportOptions.UseEnumDescription); + Assert.False(exportOptions.EnableAutoFilter); + Assert.False(exportOptions.EnableAutoWidth); Assert.Equal(",", exportOptions.ArrayDelimiter); }