mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 16:26:51 +08:00
Fix: floating widget match style with original one (#10317)
### What problem does this PR solve? These changes are intended to implement the remaining functionalities of the fullscreen widget. The question arises: how to display document prieview of PDFs in this floating widget? - simply enlarge the widget window - implement zoom in/out - render outside the iframe? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -7,6 +7,8 @@ import DocumentPreviewer from '../pdf-previewer';
|
||||
interface IProps extends IModalProps<any> {
|
||||
documentId: string;
|
||||
chunk: IChunk | IReferenceChunk;
|
||||
width?: string | number;
|
||||
height?: string | number;
|
||||
}
|
||||
|
||||
export const PdfDrawer = ({
|
||||
@ -14,13 +16,16 @@ export const PdfDrawer = ({
|
||||
hideModal,
|
||||
documentId,
|
||||
chunk,
|
||||
width = '50vw',
|
||||
height,
|
||||
}: IProps) => {
|
||||
return (
|
||||
<Drawer
|
||||
title="Document Previewer"
|
||||
onClose={hideModal}
|
||||
open={visible}
|
||||
width={'50vw'}
|
||||
width={width}
|
||||
height={height}
|
||||
>
|
||||
<DocumentPreviewer
|
||||
documentId={documentId}
|
||||
@ -31,4 +36,4 @@ export const PdfDrawer = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default PdfDrawer;
|
||||
export default PdfDrawer;
|
||||
Reference in New Issue
Block a user