Fix: Remove antd from dataset-page (#8830)

### What problem does this PR solve?

remove antd from dataset-page
[#3221](https://github.com/infiniflow/ragflow/issues/3221)
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-07-15 16:12:50 +08:00
committed by GitHub
parent 148fde8b1b
commit ed8d7291ff
27 changed files with 916 additions and 460 deletions

View File

@ -2,12 +2,12 @@ import { Images } from '@/constants/common';
import { api_host } from '@/utils/api';
import { Flex } from 'antd';
import { useParams, useSearchParams } from 'umi';
import Md from './md';
import Text from './text';
import Docx from './docx';
import Excel from './excel';
import Image from './image';
import Md from './md';
import Pdf from './pdf';
import Text from './text';
import { previewHtmlFile } from '@/utils/file-util';
import styles from './index.less';

View File

@ -19,13 +19,13 @@ const Md: React.FC<MdProps> = ({ filePath }) => {
return res.text();
})
.then((text) => setContent(text))
.catch((err) => setError(err.message))
.catch((err) => setError(err.message));
}, [filePath]);
if (error) return (<FileError>{error}</FileError>);
if (error) return <FileError>{error}</FileError>;
return (
<div style={{ padding: 24, height: "100vh", overflow: "scroll" }}>
<div style={{ padding: 24, height: '100vh', overflow: 'scroll' }}>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>
</div>
);

View File

@ -17,14 +17,14 @@ const Md: React.FC<TxtProps> = ({ filePath }) => {
return res.text();
})
.then((text) => setContent(text))
.catch((err) => setError(err.message))
.catch((err) => setError(err.message));
}, [filePath]);
if (error) return (<FileError>{error}</FileError>);
if (error) return <FileError>{error}</FileError>;
return (
<div style={{ padding: 24, height: "100vh", overflow: "scroll" }}>
{content}
<div style={{ padding: 24, height: '100vh', overflow: 'scroll' }}>
{content}
</div>
);
};