Skip to content

Commit bd3e810

Browse files
committed
refactor: 增加可为空标志
1 parent 47d2463 commit bd3e810

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
158158
/// <summary>
159159
/// <inheritdoc/>
160160
/// </summary>
161-
public Func<object, Task<string?>>? Formatter { get; set; }
161+
public Func<object?, Task<string?>>? Formatter { get; set; }
162162

163163
/// <summary>
164164
/// 获得/设置 编辑模板

src/BootstrapBlazor/Components/Table/ITableColumn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public interface ITableColumn : IEditorItem
128128
/// <summary>
129129
/// 获得/设置 列格式化回调委托 <see cref="TableColumnContext{TItem, TValue}"/>
130130
/// </summary>
131-
Func<object, Task<string?>>? Formatter { get; set; }
131+
Func<object?, Task<string?>>? Formatter { get; set; }
132132

133133
/// <summary>
134134
/// 获得/设置 文字对齐方式 默认为 null 使用 Alignment.None

src/BootstrapBlazor/Components/Table/InternalTableColumn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class InternalTableColumn(string fieldName, Type fieldType, string? fieldText =
127127
/// </summary>
128128
public string? PlaceHolder { get; set; }
129129

130-
public Func<object, Task<string?>>? Formatter { get; set; }
130+
public Func<object?, Task<string?>>? Formatter { get; set; }
131131

132132
public Alignment? Align { get; set; }
133133

src/BootstrapBlazor/Components/Table/TableColumn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public class TableColumn<TItem, TType> : BootstrapComponentBase, ITableColumn
285285
/// <inheritdoc/>
286286
/// </summary>
287287
[Parameter]
288-
public Func<object, Task<string?>>? Formatter { get; set; }
288+
public Func<object?, Task<string?>>? Formatter { get; set; }
289289

290290
/// <summary>
291291
/// 获得/设置 显示模板

0 commit comments

Comments
 (0)