@@ -291,27 +291,6 @@ public class TableColumn<TItem, TType> : BootstrapComponentBase, ITableColumn
291291 /// 获得/设置 显示模板
292292 /// </summary>
293293 [ Parameter ]
294- #if NET5_0
295- public RenderFragment < TableColumnContext < object , TType > > ? Template { get ; set ; }
296-
297- /// <summary>
298- /// 内部使用负责把 object 类型的绑定数据值转化为泛型数据传递给前端
299- /// </summary>
300- RenderFragment < object > ? ITableColumn . Template
301- {
302- get => Template == null ? null : new RenderFragment < object > ( context => builder =>
303- {
304- // 此处 context 为行数据
305- var fieldName = GetFieldName ( ) ;
306- var value = Utility . GetPropertyValue < object , TType > ( context , fieldName ) ;
307- builder . AddContent ( 0 , Template . Invoke ( new TableColumnContext < object , TType > ( context , value ) ) ) ;
308- } ) ;
309- set
310- {
311-
312- }
313- }
314- #elif NET6_0_OR_GREATER
315294 public RenderFragment < TableColumnContext < TItem , TType ? > > ? Template { get ; set ; }
316295
317296 /// <summary>
@@ -338,15 +317,11 @@ public class TableColumn<TItem, TType> : BootstrapComponentBase, ITableColumn
338317
339318 }
340319 }
341- #endif
342320
343321 /// <summary>
344322 /// 获得/设置 编辑模板
345323 /// </summary>
346324 [ Parameter ]
347- #if NET5_0
348- public RenderFragment < object > ? EditTemplate { get ; set ; }
349- #elif NET6_0_OR_GREATER
350325 public RenderFragment < TItem > ? EditTemplate { get ; set ; }
351326
352327 RenderFragment < object > ? IEditorItem . EditTemplate
@@ -362,16 +337,12 @@ public class TableColumn<TItem, TType> : BootstrapComponentBase, ITableColumn
362337 {
363338 }
364339 }
365- #endif
366340
367341 /// <summary>
368342 /// 获得/设置 搜索模板
369343 /// </summary>
370344 /// <value></value>
371345 [ Parameter ]
372- #if NET5_0
373- public RenderFragment < object > ? SearchTemplate { get ; set ; }
374- #elif NET6_0_OR_GREATER
375346 public RenderFragment < TItem > ? SearchTemplate { get ; set ; }
376347
377348 RenderFragment < object > ? ITableColumn . SearchTemplate
@@ -387,7 +358,6 @@ public class TableColumn<TItem, TType> : BootstrapComponentBase, ITableColumn
387358 {
388359 }
389360 }
390- #endif
391361
392362 /// <summary>
393363 /// 获得/设置 过滤模板
0 commit comments