Browse Source

fix(form): radioButtonGroup value support boolean

pull/693/head
zuihou 5 years ago
parent
commit
9e2aa20daa
  1. 4
      src/components/Form/src/components/RadioButtonGroup.vue

4
src/components/Form/src/components/RadioButtonGroup.vue

@ -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 | number; disabled?: boolean }; type OptionsItem = { label: string; value: string | number | boolean; 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, Number] as PropType<string | number>, type: [String, Number, Boolean] as PropType<string | number | boolean>,
}, },
options: { options: {
type: Array as PropType<RadioItem[]>, type: Array as PropType<RadioItem[]>,

Loading…
Cancel
Save