mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 11:36:44 +08:00
### What problem does this PR solve? fix: fix uploaded file time error #680 feat: support preview of word and excel #684 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,22 +1,24 @@
|
||||
import { api_host } from '@/utils/api';
|
||||
import React from 'react';
|
||||
|
||||
interface IProps extends React.PropsWithChildren {
|
||||
documentId: string;
|
||||
link: string;
|
||||
preventDefault?: boolean;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
const NewDocumentLink = ({
|
||||
children,
|
||||
documentId,
|
||||
link,
|
||||
preventDefault = false,
|
||||
color = 'rgb(15, 79, 170)',
|
||||
}: IProps) => {
|
||||
return (
|
||||
<a
|
||||
target="_blank"
|
||||
onClick={!preventDefault ? undefined : (e) => e.preventDefault()}
|
||||
href={`${api_host}/document/get/${documentId}`}
|
||||
href={link}
|
||||
rel="noreferrer"
|
||||
style={{ color }}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user