Skip to content

Radio 单选框

规则

基础示例

Props 配置示例

横向排列

自定义样式

某项禁用

整组禁用

Events 事件示例

监听选择变化

选择后联动更新

完整配置项:Vant_Radio

value :String | Number

Options

字段名说明字段类型是否必填默认值
value参数值String,Numbertrue-
text字段别名Stringtrue-
disabled设置为禁用状态Booleanfalsefalse

Props

参数说明类型默认值
disabled是否禁用所有单选框booleanfalse
direction排列方向,可选值为 horizontalstringvertical
icon-size所有单选框的图标大小,默认单位为 pxnumber | string20px
checked-color所有单选框的选中状态颜色string#1989fa
shape形状,可选值为 square dotstringround

Events

事件名说明回调参数
change当绑定值变化时触发的事件name: string

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