mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 21:17:36 +08:00
c3b0b114e6
* 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>
18 lines
500 B
C#
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>
|