Skip to content

单选框 Radio

基本用法

单选框组

利用 RadioGroup 绑定一组值互斥的单选框

带边框的单选框

按钮形式的单选框组

不同尺寸

RadioRadioButton 都有三种内置的尺寸可选

API

Radio Props

参数名说明类型可选值默认值
border是否带有边框booleanfalse
disabled禁用状态booleanfalse
label单选框的值string / boolean / number
size单选框的尺寸stringsmall / medium / largemedium
modelValue单独使用时绑定的 v-modelstring / boolean / number

Radio Events

事件名说明回调参数
change值发生变化时触发(newValue, label: string/boolean/number, e: Event)

Radio Slots

插槽名说明子标签
default默认插槽

RadioGroup Props

参数名说明类型可选值默认值
modelValuev-modelstring / boolean / number

RadioGroup Events

事件名说明回调参数
change值发生变化时触发(newValue, e: Event)

RadioGroup Slots

插槽名说明子标签
default默认插槽Radio / RadioButton

RadioButton Props

参数名说明类型可选值默认值
disabled是否禁用booleanfalse
label绑定的值number / string / boolean
size复选按钮的尺寸stringsmall / medium / largemedium
modelValue单独使用时绑定的 v-modelnumber / string / boolean

RadioButton Events

事件名说明回调参数
change值发生变化时触发(newValue, label: string/boolean/number, e: Event)

RadioButton Slots

插槽名说明子标签
default默认插槽