Radio 单选框
规则
基础示例
Props 配置示例
按钮样式
禁用选项
整组禁用
Events 事件示例
监听选择变化
选择后联动更新
完整配置项:TDesign_Radio
value:string | number | boolean
Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|---|---|---|---|---|
| allowUncheck | 是否允许取消选中 | boolean | false | - |
| direction | 排列方向 | horizontal | vertical | horizontal | - |
| disabled | 是否禁用全部子项 | boolean | - | - |
| name | HTML 原生 name | string | - | - |
| options | 选项数据(也可用 rule.options) | Array<RadioOption> | - | - |
| readonly | 只读 | boolean | - | - |
| size | 尺寸(theme=button 时生效) | small | medium | large | medium | - |
| theme | 风格 | radio | button | radio | - |
| value | 选中值 | string | number | boolean | - | - |
| defaultValue | 非受控选中值 | string | number | boolean | - | - |
| variant | 按钮形式风格 | outline | primary-filled | default-filled | outline | - |
Events
| 事件 | 说明 | 类型 | 版本 |
|---|---|---|---|
| change | 选中值变化 | (value, context: { e: Event; name?: string }) => void | - |


