2022-01-18 10:06:29 +08:00
|
|
|
|
using AntDesign.TableModels;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
2021-09-22 22:07:56 +08:00
|
|
|
|
|
|
|
|
|
namespace AntDesign
|
2020-06-19 23:06:33 +08:00
|
|
|
|
{
|
|
|
|
|
public partial class ActionColumn : ColumnBase
|
|
|
|
|
{
|
2021-09-22 22:07:56 +08:00
|
|
|
|
[CascadingParameter(Name = "AntDesign.Column.Blocked")]
|
|
|
|
|
public bool Blocked { get; set; }
|
|
|
|
|
|
2022-01-18 10:06:29 +08:00
|
|
|
|
[Parameter]
|
|
|
|
|
public virtual RenderFragment<CellData> CellRender { get; set; }
|
|
|
|
|
|
2021-08-28 14:10:39 +08:00
|
|
|
|
protected override void OnInitialized()
|
|
|
|
|
{
|
|
|
|
|
base.OnInitialized();
|
|
|
|
|
if (IsHeader)
|
|
|
|
|
{
|
|
|
|
|
Context.HeaderColumnInitialed(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-22 22:07:56 +08:00
|
|
|
|
|
|
|
|
|
protected override bool ShouldRender()
|
|
|
|
|
{
|
|
|
|
|
if (Blocked) return false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2020-06-19 23:06:33 +08:00
|
|
|
|
}
|
|
|
|
|
}
|