import React, { useState } from 'react'; import { Button, Input, Space } from 'antd'; import { ReactComponent as SvgLogo } from '@/icons/logo.svg'; import './styles/side-menu.less'; import { SearchOutlined } from '@ant-design/icons'; import ProList from '@ant-design/pro-list'; interface SideMenuProps { onCollaped: (isExpanded: boolean)=> void, initWidth: number } function SideMenu ({ initWidth = 200, }: SideMenuProps) { const [activeKey, setActiveKey] = useState(''); const data = [ { teacherName: '张三', schoolName: '清华大学', }, { teacherName: '李四', schoolName: '北京大学', }, { teacherName: '王五', schoolName: '南京大学', }, { teacherName: '麻六', schoolName: '上海大学', } ].map((item) => ({ title: item.teacherName, description: item.schoolName, actions: [], avatar: false, })); return (

评审管理系统

参评教师
pagination={false} showActions="hover" onItem={(record) => { return { onClick: () => { setActiveKey(record.title); }, }; }} rowClassName={(record: { title: string }) => record.title === activeKey ? 'active' : '' } metas={{ title: {}, description: { render: (text) =>
{text}
, }, avatar: {}, }} dataSource={data} />
); } export default SideMenu;