fix(style): document list

This commit is contained in:
jialin
2024-10-14 10:40:13 +08:00
parent 2b61e3dfd3
commit ec68ce082e
4 changed files with 7 additions and 4 deletions
@@ -10,18 +10,20 @@ 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<FileListProps> = (props) => {
const { fileList, ghost, showIcon = true, onDelete } = props;
const { textListCount, fileList, ghost, showIcon = true, onDelete } = props;
const intl = useIntl();
return (
<div className="file-list">
{fileList.map((file) => {
{fileList.map((file, index) => {
return (
<div key={file.uid} className={classNames('file-item', { ghost })}>
<span className="title">
<span className="m-r-5">{index + 1 + textListCount}.</span>
{showIcon && <PaperClipOutlined className="m-r-5" />}
<AutoTooltip ghost> {file.name}</AutoTooltip>
</span>