Skip to content

Radio 单选框 ​

规则 ​

基础示例 ​

Props 配置示例 ​

按钮样式 ​

禁用选项 ​

整组禁用 ​

Events 事件示例 ​

监听选择变化 ​

选择后联动更新 ​

完整配置项:TDesign_Radio

value:string | number | boolean

Props ​

参数说明类型默认值版本
allowUncheck是否允许取消选中booleanfalse-
direction排列方向horizontal | verticalhorizontal-
disabled是否禁用全部子项boolean--
nameHTML 原生 namestring--
options选项数据(也可用 rule.options)Array<RadioOption>--
readonly只读boolean--
size尺寸(theme=button 时生效)small | medium | largemedium-
theme风格radio | buttonradio-
value选中值string | number | boolean--
defaultValue非受控选中值string | number | boolean--
variant按钮形式风格outline | primary-filled | default-filledoutline-

Events ​

事件说明类型版本
change选中值变化(value, context: { e: Event; name?: string }) => void-

FormCreate 是一个开源项目,基于 MIT 许可证发布,欢迎个人和企业用户免费使用