mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 13:37:35 +08:00
30 lines
701 B
C#
30 lines
701 B
C#
using AntDesign.TableModels;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign
|
|
{
|
|
public partial class ActionColumn : ColumnBase
|
|
{
|
|
[CascadingParameter(Name = "AntDesign.Column.Blocked")]
|
|
public bool Blocked { get; set; }
|
|
|
|
[Parameter]
|
|
public virtual RenderFragment<CellData> CellRender { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
if (IsHeader)
|
|
{
|
|
Context.HeaderColumnInitialed(this);
|
|
}
|
|
}
|
|
|
|
protected override bool ShouldRender()
|
|
{
|
|
if (Blocked) return false;
|
|
return true;
|
|
}
|
|
}
|
|
}
|