import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { Card, Row, Col, Empty } from 'antd'; import type { RootState } from '@/states/store'; // 假设RootState已定义 import { View } from '@/states/patient/viewSelection'; import { addSelectedView } from '@/states/patient/viewSelection'; const RegisterViewList: React.FC = () => { // 监听selectedViews const availableViews = useSelector( (state: RootState) => state.viewSelection.availableViews ); const dispatch = useDispatch(); const handleCardClick = (view: View) => { dispatch(addSelectedView(view)); }; return (