import React, { useEffect, useState, useRef } from 'react'; import { UserOutlined } from '@ant-design/icons'; import { Form } from '@ant-design/compatible'; import '@ant-design/compatible/assets/index.css'; import { Steps, Button, Drawer, Comment, Tooltip, Avatar, List, Card, Modal, Checkbox, Row, Col, message, Input, Table, Alert, Spin, Tabs, } from 'antd'; import moment from 'moment'; const { Step } = Steps; const { TextArea } = Input; const { TabPane } = Tabs; // 评论 function CommentDrawer(props) { const { visible, onClose, list, addComment, loading } = props; const [value, setValue] = useState(''); // const [commentList, setCommentList] = useState([]); const handleSubmit = () => { if (!value) return; addComment(value, () => { setValue(''); }); }; return ( (
  • {item.AuthorUser.CName}} avatar={} alt={item.author} />} content={

    {item.comment}

    } datetime={ {moment(item.c_time).fromNow()} } />
  • )} /> } alt="张三" />} content={ <>