- 文本编辑控件,默认显示文本,点击编辑,显示编辑框
@inherits BaseComponent
<KEditInput Value="@test" OnSave="OnSaveTest" />
@code {
private string test;
}
class Test : BaseComponent
{
protected override void BuildRender(RenderTreeBuilder builder)
{
builder.Component<KEditInput>()
.Set(c => c.Value, test) //控件值
.Set(c => c.OnSave, OnSaveTest) //控件值保存方法
.Build();
}
}