File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const radioGroupProps = {
2727 value : PropTypes . any ,
2828 size : PropTypes . oneOf ( RadioGroupSizeTypes ) . def ( 'default' ) ,
2929 options : {
30- type : Array as PropType < Array < String | RadioGroupChildOption > > ,
30+ type : Array as PropType < Array < string | RadioGroupChildOption | number > > ,
3131 } ,
3232 disabled : PropTypes . looseBool ,
3333 name : PropTypes . string ,
@@ -95,7 +95,7 @@ export default defineComponent({
9595 const optionsPrefixCls =
9696 optionType === 'button' ? `${ prefixCls . value } -button` : prefixCls . value ;
9797 children = options . map ( option => {
98- if ( typeof option === 'string' ) {
98+ if ( typeof option === 'string' || typeof option === 'number' ) {
9999 return (
100100 < Radio
101101 key = { option }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Radio group can wrap a group of `Radio`。
3232| buttonStyle | style type of radio button | ` outline ` \| ` solid ` | ` outline ` | |
3333| disabled | Disable all radio buttons | boolean | false | |
3434| 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 }> | - | |
3636| optionType | Set Radio optionType | ` default ` \| ` button ` | ` default ` | 3.0.0 |
3737| size | size for radio button style | ` large ` \| ` default ` \| ` small ` | ` default ` | |
3838| 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
3333| buttonStyle | RadioButton 的风格样式,目前有描边和填色两种风格 | ` outline ` \| ` solid ` | ` outline ` | |
3434| disabled | 禁选所有子单选器 | boolean | false | |
3535| 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 }> | - | |
3737| optionType | 用于设置 Radio ` options ` 类型 | ` default ` \| ` button ` | ` default ` | 3.0.0 |
3838| size | 大小,只对按钮样式生效 | ` large ` \| ` default ` \| ` small ` | ` default ` | |
3939| value(v-model) | 用于设置当前选中的值 | any | - | |
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ span.@{radio-prefix-cls} + * {
174174 display : inline-block ;
175175 height : @btn-height-base ;
176176 margin : 0 ;
177- padding : 0 @padding-md - 1 px ;
177+ padding : 0 @radio-button-padding-horizontal ;
178178 color : @radio-button-color ;
179179 font-size : @font-size-base ;
180180 line-height : @btn-height-base - 2px ;
You can’t perform that action at this time.
0 commit comments