fix(form): radioButtonGroup value support number
This commit is contained in:
parent
5ddccf6ba2
commit
bbddf30e96
|
|
@ -17,7 +17,7 @@
|
||||||
import { isString } from '/@/utils/is';
|
import { isString } from '/@/utils/is';
|
||||||
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||||
type OptionsItem = { label: string; value: string; disabled?: boolean };
|
type OptionsItem = { label: string; value: string | number; disabled?: boolean };
|
||||||
type RadioItem = string | OptionsItem;
|
type RadioItem = string | OptionsItem;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: String as PropType<string>,
|
type: [String, Number] as PropType<string | number>,
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
type: Array as PropType<RadioItem[]>,
|
type: Array as PropType<RadioItem[]>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue