File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const radioGroupProps = {
27
27
value : PropTypes . any ,
28
28
size : PropTypes . oneOf ( RadioGroupSizeTypes ) . def ( 'default' ) ,
29
29
options : {
30
- type : Array as PropType < Array < String | RadioGroupChildOption > > ,
30
+ type : Array as PropType < Array < string | RadioGroupChildOption | number > > ,
31
31
} ,
32
32
disabled : PropTypes . looseBool ,
33
33
name : PropTypes . string ,
@@ -95,7 +95,7 @@ export default defineComponent({
95
95
const optionsPrefixCls =
96
96
optionType === 'button' ? `${ prefixCls . value } -button` : prefixCls . value ;
97
97
children = options . map ( option => {
98
- if ( typeof option === 'string' ) {
98
+ if ( typeof option === 'string' || typeof option === 'number' ) {
99
99
return (
100
100
< Radio
101
101
key = { option }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Radio group can wrap a group of `Radio`。
32
32
| buttonStyle | style type of radio button | ` outline ` \| ` solid ` | ` outline ` | |
33
33
| disabled | Disable all radio buttons | boolean | false | |
34
34
| name | The ` name ` property of all ` input[type="radio"] ` children | string | - | |
35
- | options | set children optional | string\[ ] \| Array< ; { label: string value: string disabled?: boolean }> | - | |
35
+ | options | set children optional | string\[ ] \| number \[ ] \| Array< ; { label: string value: string disabled?: boolean }> | - | |
36
36
| optionType | Set Radio optionType | ` default ` \| ` button ` | ` default ` | 3.0.0 |
37
37
| size | size for radio button style | ` large ` \| ` default ` \| ` small ` | ` default ` | |
38
38
| value(v-model) | Used for setting the currently selected value. | any | - | |
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/8cYb5seNB/Radio.svg
33
33
| buttonStyle | RadioButton 的风格样式,目前有描边和填色两种风格 | ` outline ` \| ` solid ` | ` outline ` | |
34
34
| disabled | 禁选所有子单选器 | boolean | false | |
35
35
| name | RadioGroup 下所有 ` input[type="radio"] ` 的 ` name ` 属性 | string | - | |
36
- | options | 以配置形式设置子元素 | string\[ ] \| Array< ; { label: string value: string disabled?: boolean }> | - | |
36
+ | options | 以配置形式设置子元素 | string\[ ] \| number [ ] \| Array< ; { label: string value: string disabled?: boolean }> | - | |
37
37
| optionType | 用于设置 Radio ` options ` 类型 | ` default ` \| ` button ` | ` default ` | 3.0.0 |
38
38
| size | 大小,只对按钮样式生效 | ` large ` \| ` default ` \| ` small ` | ` default ` | |
39
39
| value(v-model) | 用于设置当前选中的值 | any | - | |
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ span.@{radio-prefix-cls} + * {
174
174
display : inline-block ;
175
175
height : @btn-height-base ;
176
176
margin : 0 ;
177
- padding : 0 @padding-md - 1 px ;
177
+ padding : 0 @radio-button-padding-horizontal ;
178
178
color : @radio-button-color ;
179
179
font-size : @font-size-base ;
180
180
line-height : @btn-height-base - 2px ;
You can’t perform that action at this time.
0 commit comments