demo/Pages/Form/BasicForm/BasicForm.razor
2024-06-21 16:48:24 +08:00

61 lines
3.4 KiB
Plaintext

@namespace antblazorpro.Pages.Form
@page "/form/basic-form"
<PageContainer Title="Basic Form">
<Breadcrumb>
<Breadcrumb>
<BreadcrumbItem>Home</BreadcrumbItem>
<BreadcrumbItem>Form</BreadcrumbItem>
<BreadcrumbItem>Basic Form</BreadcrumbItem>
</Breadcrumb>
</Breadcrumb>
<Content>
<span>Form pages are used to collect or verify information to users, and basic forms are common in scenarios where there are fewer data items.</span>
</Content>
<ChildContent>
<Card>
<Form
Model="@_model"
Style="margin-top: 8px;"
OnFinish="HandleSubmit">
<FormItem Label="Title" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<Input Placeholder="Give the target a name" @bind-Value="@context.Title" />
</FormItem>
<FormItem Label="Start and end date" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<RangePicker Style="width:100%;" TValue="DateTime?[]" @bind-Value="@context.DateRange" />
</FormItem>
<FormItem Label="Goal description" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<TextArea MinRows="4" @bind-Value="@context.Goal"></TextArea>
</FormItem>
<FormItem Label="Metrics" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<TextArea MinRows="4" @bind-Value="@context.Standard"></TextArea>
</FormItem>
<FormItem Label="Client" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<Input Placeholder="Please describe your customer service, internal customers directly Name job number" @bind-Value="@context.Client" />
</FormItem>
<FormItem Label="Inviting critics" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<Input Placeholder="Please describe your customer service, internal customers directly Name job number" @bind-Value="@context.Invites" />
</FormItem>
<FormItem Label="Weight" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<AntDesign.InputNumber @bind-Value="@context.Weight" Min="0" Max="100" DefaultValue="0" />
<span class="ant-form-text">%</span>
</FormItem>
<FormItem Label="Target disclosure" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
<RadioGroup @bind-Value="@context.Disclosure">
<Radio Value="1">Public</Radio>
<Radio Value="2">Partially public</Radio>
<Radio Value="3">Private</Radio>
</RadioGroup>
</FormItem>
<FormItem Label=" " Style="margin-top:32px" WrapperCol="_submitFormLayout.WrapperCol">
<Button Type="primary" HtmlType="submit">
Submit
</Button>
<Button Style="margin-left:8px">
Save
</Button>
</FormItem>
</Form>
</Card>
</ChildContent>
</PageContainer>