import React from 'react'; import { Card, Grid, Button, Row, Flex } from 'antd'; import { CloseOutlined } from '@ant-design/icons'; import { getViewIconUrl } from '@/API/bodyPosition'; import { Image } from 'antd'; import { FormattedMessage } from 'react-intl'; import { useSelector } from 'react-redux'; import type { RootState } from '@/states/store'; import type { View } from '@/states/patient/viewSelection'; const { useBreakpoint } = Grid; // 卡片尺寸配置 const getCardSize = (screens: ReturnType) => { if (screens.xl || screens.xxl) { return { width: 150, height: 100 }; } if (screens.md || screens.lg) { return { width: 90, height: 60 }; } return { width: 60, height: 45 }; }; interface SelectedProtocolListProps { style?: React.CSSProperties; className?: string; } const SelectedProtocolList: React.FC = () => { const screens = useBreakpoint(); const cardSize = getCardSize(screens); // 从redux获取selectedViews const selectedViews = useSelector( (state: RootState) => state.viewSelection.selectedViews ); // 移除操作(实际项目可用props传递onRemove) const handleRemove = (id: string) => { // 这里仅做演示 // 实际应通过props回调或状态管理移除 alert(`移除体位ID: ${id}`); }; return ( {selectedViews.map((item: View) => ( example {item.view_name}