mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: transform the parser's data structure and add Image to TestingResult (#63)
* feat: add Image to TestingResult * feat: transform the parser's data structure
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import Image from '@/components/image';
|
||||
import { IChunk } from '@/interfaces/database/knowledge';
|
||||
import { api_host } from '@/utils/api';
|
||||
import { Card, Checkbox, CheckboxProps, Flex, Popover, Switch } from 'antd';
|
||||
|
||||
import { useState } from 'react';
|
||||
import styles from './index.less';
|
||||
|
||||
@ -13,22 +13,6 @@ interface IProps {
|
||||
handleCheckboxClick: (chunkId: string, checked: boolean) => void;
|
||||
}
|
||||
|
||||
interface IImage {
|
||||
id: string;
|
||||
className: string;
|
||||
}
|
||||
// Pass onMouseEnter and onMouseLeave to img tag using props
|
||||
const Image = ({ id, className, ...props }: IImage) => {
|
||||
return (
|
||||
<img
|
||||
{...props}
|
||||
src={`${api_host}/document/image/${id}`}
|
||||
alt=""
|
||||
className={className}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const ChunkCard = ({
|
||||
item,
|
||||
checked,
|
||||
|
||||
Reference in New Issue
Block a user