ant-design-blazor/components/form/Form.razor
笨木头 c3b0b114e6 feat: add form(basic features) (#168)
* feat: add form(not complete yet)

* feat: add form(basic)

* refactor: change namespace

* feat(module: form): add onFinish, onFinishFailed, reset

* feat(module: form): add layout demo

* feat(module: form): update doc

* refactor: basic form

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-01 14:09:28 +08:00

18 lines
500 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
@typeparam TModel
@using Microsoft.AspNetCore.Components.Forms;
@using AntDesign.Internal;
<EditForm class="@ClassMapper.Class"
style="@Style"
id="@Id"
EditContext="_editContext"
OnValidSubmit="OnFinish"
OnInvalidSubmit="OnFinishFailed">
<DataAnnotationsValidator />
<CascadingValue Value="this" Name="Form" TValue="IForm">
@ChildContent(Model)
</CascadingValue>
</EditForm>