import { Timeline } from 'antd'; import styles from './index.less'; import { STATUS, SUB_STATUS } from './List'; import moment from 'moment'; import { useMemo } from 'react'; const StatusRender = ({ statusList }) => { const list = useMemo(() => { return statusList.map(item => { let attach = []; if (item.attach) { try { attach = JSON.parse(item.attach); } catch (e) { console.error(e); } attach = attach .map(item => { if (item instanceof Object) { return (
); } }) .filter(item => item); } return { ...item, attach }; }); }); return (