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; }
}

posted @ 2024-03-03 10:19  Biyuanguang  阅读(10)  评论(0编辑  收藏  举报