Skip to content

Commit c4de624

Browse files
committed
refactor: 移除列格式化操作日志
1 parent e3a1545 commit c4de624

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public static List<IFilterAction> ToSearches(this IEnumerable<ITableColumn> colu
172172
return searches;
173173
}
174174

175-
internal static RenderFragment RenderValue<TItem>(this ITableColumn col, TItem item) => async builder =>
175+
internal static RenderFragment RenderValue<TItem>(this ITableColumn col, TItem item) => builder =>
176176
{
177177
var val = col.GetItemValue(item);
178178
if (col.Lookup != null && val != null)
@@ -191,12 +191,7 @@ internal static RenderFragment RenderValue<TItem>(this ITableColumn col, TItem i
191191
else
192192
{
193193
string? content;
194-
if (col.Formatter != null)
195-
{
196-
// 格式化回调委托
197-
content = await col.Formatter(new TableColumnContext<TItem, object?>(item, val));
198-
}
199-
else if (!string.IsNullOrEmpty(col.FormatString))
194+
if (!string.IsNullOrEmpty(col.FormatString))
200195
{
201196
// 格式化字符串
202197
content = Utility.Format(val, col.FormatString);

0 commit comments

Comments
 (0)