Radio 单选框
基础用法
禁用状态
disabled
属性可以用来控制单选框的禁用状态。
单选框组
结合 dd-radio-group
元素和子元素 dd-radio
可以实现单选组, 为 dd-radio-group
绑定 v-model。
按钮样式
你可以让单选框看起来像一个按钮一样。
带有边框
尺寸
Radio API
Radio Attributes
Name | Description | Type | Default | Version |
---|---|---|---|---|
checked(v-model) | 绑定值 | boolean | — | |
value | 值 | string | number | boolean | — | |
disabled | 禁用 | boolean | false | |
size | 输入框尺寸 | large | default | small | — |
Radio Events
Name | Description | Type |
---|---|---|
change | 仅当 modelValue 改变时 | (value: string | number | boolean) => void |
Radio Slots
Name | Description |
---|---|
default | 自定义默认内容 |
RadioGroup API
RadioGroup Attributes
Name | Description | Type | Default | Version |
---|---|---|---|---|
value(v-model) | 绑定值 | string | number | boolean | — | |
disabled | 禁用 | boolean | false | |
size | 输入框尺寸 | large | default | small | — | |
buttonStyle | 风格样式 | outline | solid | outline |
RadioGroup Events
Name | Description | Type |
---|---|---|
change | 仅当 modelValue 改变时 | (value: string | number | boolean, oldValue: string | number | boolean) => void |
RadioGroup Slots
Name | Description |
---|---|
default | 自定义默认内容 |