# Radio 单选按钮

在多个互斥的备选项中进行单选。

# 属性对比(只显示有差异的)

Radio 、Radio-Button WinDesign Element-ui
size
可选值: large / medium / small / mini
可选值: medium / small / mini
wrap
Checkbox-Group WinDesign Element-ui
discrete
round
plain
wrap
fill
text-color

# 代码演示

# API

# Radio Attributes

参数 说明 类型 可选值 默认值 Version
value / v-model 绑定值 string / number / boolean
border 是否加边框样式(仅 radio 生效) Boolean false
disabled 是否禁用 Boolean false
label Radio 的 value String | Number | Boolean
name 原生 name 属性 String
wrap 是否换行(仅针对边距样式调整) Boolean v2.2.2
size Radio 的尺寸,仅在 border 为真时有效 string large / medium / small / mini V2.2.5

# Radio-Button Attributes

参数 说明 类型 可选值 默认值 Version
value / v-model 绑定值 string / number / boolean
border 是否加边框样式(仅 radio 生效) Boolean false
disabled 是否禁用 Boolean false
label Radio 的 value String | Number | Boolean
name 原生 name 属性 String

# Radio 、Radio-Button Events

事件名称 说明 回调参数 Version
change 绑定值变化时触发的事件 选中的 Radio label 值

# Radio-Group Attributes

参数 说明 类型 可选值 默认值 Version
value / v-model 绑定值 string / number / boolean
discrete 按钮组是否离散(按钮不相连) Boolean v1.7.10
disabled 是否禁用 Boolean false v1.7.12
plain 轻量级按钮组 Boolean v1.5.1
round 圆角按钮样式(仅按钮样式组可用) Boolean v1.5.0
size 单选框组尺寸,仅对按钮形式的 Radio 或带有边框的 Radio 有效 String 'large' | 'medium' | 'small' | 'mini' 'medium'
wrap 是否换行(仅针对边距样式调整) Boolean v2.2.2

# Radio-group Events

事件名称 说明 回调参数 Version
change 绑定值变化时触发的事件 选中的 Radio label 值
上次更新: 4/18/2024, 1:30:27 PM