mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-19 01:54:04 +00:00
4.8.5 test fix (#1862)
* app list ui * feat: photo view * perf: app dataset filter * perf: app dataset filter * fix: chat recently apps * perf: workflow header phone * default templates * default templates * fix: input guide phone * fix: i18n * team chat history * remove code * perf: mongo connection * log level
This commit is contained in:
24
packages/web/components/common/Image/PhotoView.tsx
Normal file
24
packages/web/components/common/Image/PhotoView.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import { PhotoProvider, PhotoView } from 'react-photo-view';
|
||||
import 'react-photo-view/dist/react-photo-view.css';
|
||||
import { Box, Image, ImageProps } from '@chakra-ui/react';
|
||||
import { useSystem } from '../../../hooks/useSystem';
|
||||
import Loading from '../MyLoading';
|
||||
|
||||
const MyPhotoView = (props: ImageProps) => {
|
||||
const { isPc } = useSystem();
|
||||
return (
|
||||
<PhotoProvider
|
||||
maskOpacity={0.6}
|
||||
bannerVisible={!isPc}
|
||||
photoClosable
|
||||
loadingElement={<Loading fixed={false} />}
|
||||
>
|
||||
<PhotoView src={props.src}>
|
||||
<Image cursor={'pointer'} {...props} />
|
||||
</PhotoView>
|
||||
</PhotoProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default MyPhotoView;
|
Reference in New Issue
Block a user