Commit bbddf30e96feb1ab048323d93d3b8c1b18857acd

Authored by 无木
1 parent 5ddccf6b

fix(form): radioButtonGroup value support number

src/components/Form/src/components/RadioButtonGroup.vue
... ... @@ -17,7 +17,7 @@
17 17 import { isString } from '/@/utils/is';
18 18 import { useRuleFormItem } from '/@/hooks/component/useFormItem';
19 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 21 type RadioItem = string | OptionsItem;
22 22  
23 23 export default defineComponent({
... ... @@ -28,7 +28,7 @@
28 28 },
29 29 props: {
30 30 value: {
31   - type: String as PropType<string>,
  31 + type: [String, Number] as PropType<string | number>,
32 32 },
33 33 options: {
34 34 type: Array as PropType<RadioItem[]>,
... ...