WalkingTec.Mvvm/WalkingTec.Mvvm.Mvc/GeneratorFiles/Spa/Blazor/Create.txt
(完整代码) 1KB@page "$pagepath$"
@using $vmnamespace$;
@inherits BasePage
<ValidateForm @ref="vform" Model="@Model" OnValidSubmit="@Submit">
<Row ItemsPerRow="ItemsPerRow.Two" RowType="RowType.Normal">
$formfields$
</Row>
<div class="modal-footer table-modal-footer">
<Button Color="Color.Primary" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Close"]" OnClick="OnClose" />
<Button Color="Color.Primary" ButtonType="ButtonType.Submit" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Create"]" IsAsync="true" />
</div>
</ValidateForm>
@code {
private $modelname$VM Model = new $modelname$VM();
private ValidateForm vform { get; set; }
$fieldinit$
protected override async Task OnInitializedAsync()
{
$init$
await base.OnInitializedAsync();
}
private async Task Submit(EditContext context)
{
await PostsForm(vform, "/api/$modelname$/add", (s) => "Sys.OprationSuccess");
}
public void OnClose()
{
CloseDialog();
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
