Files
FastGPT/packages/web/components/common/Image/PhotoView.tsx
Archer adf5377ebe Add image index and pdf parse (#3956)
* feat: think tag parse

* feat: parse think tag test

* feat: pdf parse ux

* feat: doc2x parse

* perf: rewrite training mode setting

* feat: image parse queue

* perf: image index

* feat: image parse process

* feat: add init sh

* fix: ts
2025-03-06 18:28:03 +08:00

27 lines
741 B
TypeScript

import React from 'react';
import { PhotoProvider, PhotoView } from 'react-photo-view';
import 'react-photo-view/dist/react-photo-view.css';
import { ImageProps } from '@chakra-ui/react';
import { useSystem } from '../../../hooks/useSystem';
import Loading from '../MyLoading';
import MyImage from './MyImage';
const MyPhotoView = (props: ImageProps) => {
const { isPc } = useSystem();
return (
<PhotoProvider
maskOpacity={0.6}
bannerVisible={!isPc}
photoClosable
loadingElement={<Loading fixed={false} />}
>
<PhotoView src={props.src}>
<MyImage cursor={'pointer'} {...props} title={props.title || props.src} />
</PhotoView>
</PhotoProvider>
);
};
export default MyPhotoView;