mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
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:
@ -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';
|
||||
|
||||
@ -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>
|
||||
);
|
||||
|
||||
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user