import { Select, Tooltip } from 'antd' import React, { useEffect } from 'react' import { useNavigate, useParams } from 'react-router-dom' import useBearStore from '@/stores' import styles from './index.module.less' import type { FC } from 'react' interface IProps {} const GroupSelection: FC = () => { const navigate = useNavigate() const { id: routeId } = useParams<'id'>() const [_, groupedId] = routeId?.split('&') || [] const { schemaUrl, isNeedGrouped, operationNamesFromGroupOptions, identityValue, operationNameGroupedFromBackendObj, setState, } = useBearStore(state => state) const handleLinkClick: React.MouseEventHandler = event => { event.preventDefault() if (event.ctrlKey || event.metaKey) { window.open(schemaUrl, '_blank') // 在新标签页中打开链接 } } useEffect(() => { if (!identityValue) setState({ identityValue: groupedId }) }, [groupedId, identityValue]) return ( <> {isNeedGrouped && (