说明
Name 用于原生 radio 分组,多个实例共享同一 Name 即互斥。
常见能力:
- 单选组
- 纵向排列
用法
<Radio Options="@options" @bind-Value="@gender" />
API 参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Checked |
bool |
false |
单选模式:是否选中。 |
CheckedChanged |
EventCallback<bool> |
— | 事件 |
ChildContent |
RenderFragment |
null |
|
Name |
string |
"known-radio" |
name 属性,同组必须相同。 |
Options |
List<SelectOption> |
[] |
选项。 |
Text |
string |
null |
单选模式:标签文字。 |
Value |
string |
null |
绑定值。 |
ValueChanged |
EventCallback<string> |
— | 事件 |
Vertical |
bool |
false |
纵向排列。 |
Visible |
bool |
true |
取得或设置组件是否可见,默认为false。 |
VisibleChanged |
EventCallback<bool> |
— | 事件 取得或设置组件可见性变化时的回调事件。 |
Class |
string |
null |
取得或设置组件的CSS类名,用于自定义样式。 |
Disabled |
bool |
false |
取得或设置组件是否禁用,默认为false。 |
Style |
string |
null |
取得或设置组件的内联样式,用于自定义样式。 |
所有组件均继承
BaseComponent,除上表参数外还支持Class、Style、Disabled、Visible。
扫码关注公众号
扫码加入 QQ 群