Skip to content

Radio 单选框

规则

js
{
    type:"radio",
    title:"是否包邮",
    field:"is_postage",
    value:"0",
    options:[
        {value:"0",label:"不包邮",disabled:false},
        {value:"1",label:"包邮",disabled:true},
    ],
}

完整配置项:Element_Radio

value :String | Number

Options

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

Props

属性名说明类型默认值
size单选框按钮或边框按钮的大小stringdefault
type多选框类型'button'| 'radio'-
disabled是否禁用booleanfalse
validate-event输入时是否触发表单的校验booleantrue
textColor按钮形式的 Radio 激活时的文本颜色string#ffffff
fill按钮形式的 Radio 激活时的填充色和边框色string#409eff
ariaLabel与 RadioGroup 中的 aria-label 属性相同string
name原生 name 属性string
id原生 id 属性string
label与 RadioGroup 中的 aria-label 属性相同string

Events

事件名说明类型
change绑定值变化时触发的事件Function

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