import { Select } from 'antd'; import type { SelectProps } from 'antd'; import { useIntl } from 'umi'; import _ from 'lodash'; type GroupOption = { label: React.ReactNode; options: { label: string; value: any }[]; }; const GroupSelect = (props: SelectProps & { options: GroupOption[] }) => { const { formatMessage } = useIntl(); const { value, onChange, options, ...rest } = props; const handleSelect = (op: GroupOption) => { onChange?.(_.uniq([...(value || []), ...op.options.map((item) => item.value)]), op); }; return (