From ec68ce082eca689e24daf06f9eda465886bd2953 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 14 Oct 2024 10:39:29 +0800 Subject: [PATCH] fix(style): document list --- src/pages/playground/components/file-list.tsx | 6 ++++-- src/pages/playground/components/ground-reranker.tsx | 1 + src/pages/playground/components/input-list.tsx | 2 +- src/pages/playground/components/rerank-message.tsx | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pages/playground/components/file-list.tsx b/src/pages/playground/components/file-list.tsx index 08db044b..65feaa96 100644 --- a/src/pages/playground/components/file-list.tsx +++ b/src/pages/playground/components/file-list.tsx @@ -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 = (props) => { - const { fileList, ghost, showIcon = true, onDelete } = props; + const { textListCount, fileList, ghost, showIcon = true, onDelete } = props; const intl = useIntl(); return (
- {fileList.map((file) => { + {fileList.map((file, index) => { return (
+ {index + 1 + textListCount}. {showIcon && } {file.name} diff --git a/src/pages/playground/components/ground-reranker.tsx b/src/pages/playground/components/ground-reranker.tsx index 832854e5..20d4056b 100644 --- a/src/pages/playground/components/ground-reranker.tsx +++ b/src/pages/playground/components/ground-reranker.tsx @@ -306,6 +306,7 @@ const GroundReranker: React.FC = forwardRef((props, ref) => {
diff --git a/src/pages/playground/components/input-list.tsx b/src/pages/playground/components/input-list.tsx index 22caceff..35752605 100644 --- a/src/pages/playground/components/input-list.tsx +++ b/src/pages/playground/components/input-list.tsx @@ -70,7 +70,7 @@ const InputList: React.FC = ({ textList, onChange }) => {
handleTextChange(e.target.value, text)} > diff --git a/src/pages/playground/components/rerank-message.tsx b/src/pages/playground/components/rerank-message.tsx index 85d8b8f0..917a9489 100644 --- a/src/pages/playground/components/rerank-message.tsx +++ b/src/pages/playground/components/rerank-message.tsx @@ -37,7 +37,7 @@ const RerankMessage: React.FC = ({ dataList }) => {
{sItem.text}
-
《{sItem.title}》
+ {/*
《{sItem.title}》
*/} ); })}