Blazor选择框使用
<PageTitle>Conditional Attribute</PageTitle>
<h1>Conditional Attribute Example</h1>
<label>
<input type="checkbox" checked="@IsCompleted" />
Is Completed?
</label>
<button @onclick="@(() => IsCompleted = !IsCompleted)">
Change IsCompleted
</button>
@code {
[Parameter]
public bool IsCompleted { get; set; }
}