RadioGroup (单选组)
单选组(v-model + options),支持经典 / 卡片变体。
基础用法
Framework
Basic.vue
卡片变体
订阅方案
免费版适合个人体验
专业版适合小型团队
团队版适合企业协作
Card.vue
颜色
primary
secondary
success
warning
danger
Colors.vue
带描述的选项
带描述的选项
Descriptions.vue
方向
水平排列(horizontal)
垂直排列(vertical,默认)
Orientation.vue
禁用
禁用单个选项
整组禁用
Disabled.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| modelValue * | KunRadioValue | — | |
| options * | readonly KunRadioOption<KunRadioValue>[] | — | |
| ariaLabel | string | "" | |
| className | string | "" | |
| color | KunUIColor | "primary" | |
| disabled | boolean | false | |
| error | string | "" | |
| hideIndicator | boolean | false | `card` variant only: drop the radio-dot indicator and signal selection with the tinted border/fill alone (the icon-card look). No effect on classic/pill. |
| label | string | "" | |
| orientation | KunRadioOrientation | "vertical" | |
| rounded | KunUIRounded | — | `card` variant only — it is the only variant with a surface of its own to round. `classic` is a dot plus a label, and `pill` is a pill by definition; both ignore this. |
| size | KunUISize | "md" | |
| variant | KunRadioVariant | "classic" |
事件
| 事件 | 回调参数 | 说明 |
|---|---|---|
| change | value: KunRadioValue, index: number | The newly selected value and its index. Not fired for a click on the already-selected option. |
| update:modelValue | value: KunRadioValue |