import AutoTooltip from '@/components/auto-tooltip'; import { DeleteOutlined, PaperClipOutlined } from '@ant-design/icons'; import { useIntl } from '@umijs/max'; import { Button, Tooltip } from 'antd'; import classNames from 'classnames'; import React from 'react'; import '../style/file-list.less'; interface FileListProps { fileList: { text: string; name: string; uid: number | string }[]; ghost?: boolean; showIcon?: boolean; textListCount: number; onDelete?: (uid: number | string) => void; } const FileList: React.FC = (props) => { const { textListCount, fileList, ghost, showIcon = true, onDelete } = props; const intl = useIntl(); return (
{fileList.map((file, index) => { return (
{index + 1 + textListCount}. {showIcon && } {file.name} {onDelete && ( )}
); })}
); }; export default React.memo(FileList);