Commit bbddf30e96feb1ab048323d93d3b8c1b18857acd
1 parent
5ddccf6b
fix(form): radioButtonGroup value support number
Showing
1 changed file
with
2 additions
and
2 deletions
src/components/Form/src/components/RadioButtonGroup.vue
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | import { isString } from '/@/utils/is'; | 17 | import { isString } from '/@/utils/is'; |
18 | import { useRuleFormItem } from '/@/hooks/component/useFormItem'; | 18 | import { useRuleFormItem } from '/@/hooks/component/useFormItem'; |
19 | import { useAttrs } from '/@/hooks/core/useAttrs'; | 19 | import { useAttrs } from '/@/hooks/core/useAttrs'; |
20 | - type OptionsItem = { label: string; value: string; disabled?: boolean }; | 20 | + type OptionsItem = { label: string; value: string | number; disabled?: boolean }; |
21 | type RadioItem = string | OptionsItem; | 21 | type RadioItem = string | OptionsItem; |
22 | 22 | ||
23 | export default defineComponent({ | 23 | export default defineComponent({ |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | }, | 28 | }, |
29 | props: { | 29 | props: { |
30 | value: { | 30 | value: { |
31 | - type: String as PropType<string>, | 31 | + type: [String, Number] as PropType<string | number>, |
32 | }, | 32 | }, |
33 | options: { | 33 | options: { |
34 | type: Array as PropType<RadioItem[]>, | 34 | type: Array as PropType<RadioItem[]>, |