fix(style): document list
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -306,6 +306,7 @@ const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
<div style={{ marginTop: 8 }}>
|
||||
<FileList
|
||||
fileList={fileList}
|
||||
textListCount={textList.length || 0}
|
||||
onDelete={handleDeleteFile}
|
||||
></FileList>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,7 @@ const InputList: React.FC<InputListProps> = ({ textList, onChange }) => {
|
||||
<div key={text.uid} className="input-item">
|
||||
<div className="input-wrap">
|
||||
<RowTextarea
|
||||
label={`Text ${index + 1}`}
|
||||
label={`${index + 1}.`}
|
||||
value={text.text}
|
||||
onChange={(e) => handleTextChange(e.target.value, text)}
|
||||
></RowTextarea>
|
||||
|
||||
@@ -37,7 +37,7 @@ const RerankMessage: React.FC<RerankMessageProps> = ({ dataList }) => {
|
||||
</span>
|
||||
</dt>
|
||||
<dd className="text">{sItem.text}</dd>
|
||||
<dd className="doc-name">《{sItem.title}》</dd>
|
||||
{/* <dd className="doc-name">《{sItem.title}》</dd> */}
|
||||
</dl>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user