/**
 * @desc 单选框
 * @author denghuan
 */
import React, { useMemo } from 'react';
import { Radio as AntRadio, } from 'antd';
const { Group } = AntRadio;
const NewGroup = (props) => {
    const { dictData, options, ...children } = props;
    const newOptions = useMemo(() => {
        return dictData
            ? dictData.map(item => {
                return { value: item.id, label: item.name };
            })
            : options;
    }, [dictData, options]);
    return React.createElement(Group, { options: newOptions, ...children });
};
const Radio = { ...AntRadio };
Radio.Group = NewGroup;
export default Radio;
