提交 bbddf30e 作者: 无木

fix(form): radioButtonGroup value support number

上级 5ddccf6b
...@@ -17,7 +17,7 @@ ...@@ -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 @@ ...@@ -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[]>,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论