2020-06-01 14:09:28 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
@typeparam TModel
|
|
|
|
|
@using Microsoft.AspNetCore.Components.Forms;
|
|
|
|
|
@using AntDesign.Internal;
|
|
|
|
|
|
2020-06-10 19:13:09 +08:00
|
|
|
|
<Spin Spinning="Loading">
|
|
|
|
|
<EditForm class="@ClassMapper.Class"
|
|
|
|
|
style="@Style"
|
|
|
|
|
id="@Id"
|
|
|
|
|
EditContext="_editContext"
|
2020-07-16 08:56:15 +08:00
|
|
|
|
OnValidSubmit="OnValidSubmit"
|
|
|
|
|
OnInvalidSubmit="OnInvalidSubmit">
|
2020-07-13 12:26:09 +08:00
|
|
|
|
<ObjectGraphDataAnnotationsValidator />
|
2020-06-10 19:13:09 +08:00
|
|
|
|
<CascadingValue Value="this" Name="Form" TValue="IForm">
|
|
|
|
|
@if (!string.IsNullOrEmpty(Size))
|
|
|
|
|
{
|
|
|
|
|
<CascadingValue Value="Size" Name="FormSize">
|
|
|
|
|
@ChildContent(Model)
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-06-07 00:47:18 +08:00
|
|
|
|
@ChildContent(Model)
|
2020-06-10 19:13:09 +08:00
|
|
|
|
}
|
2020-06-07 00:47:18 +08:00
|
|
|
|
|
2020-06-10 19:13:09 +08:00
|
|
|
|
</CascadingValue>
|
|
|
|
|
</EditForm>
|
|
|
|
|
</Spin>
|