# 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

# 代码演示

国际化(多语言)

1、超出换行显示全部 2、以单词换行

Vue.use(WinDesign, { i18nOverflow: true })
1

# 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
size Checkbox 的尺寸(默认) string large / medium / default V2.4.37
disabled-highlight 是否使已选且禁用的文字凸显 Boolean false V2.4.6
tight 是否开启紧凑版(左右间距均为 8px) Boolean false V2.4.33

# 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
tight 是否开启紧凑版(左右间距均为 8px) Boolean false V2.4.33

# 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
direction 横向/纵向排列 String 'horizontal' v2.4.27
tight 是否开启紧凑版(左右间距均为 8px) Boolean false V2.4.33

# Radio-group Events

事件名称 说明 回调参数 Version
change 绑定值变化时触发的事件 选中的 Radio label 值
上次更新: 3/18/2025, 9:42:22 AM