mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
fix: chunk preview drawer can not scroll, common drawer content scroll should decide by content; (#1539)
This commit is contained in:
@@ -67,7 +67,7 @@ const MyRightDrawer = ({
|
|||||||
<DrawerCloseButton position={'relative'} fontSize={'sm'} top={0} right={0} />
|
<DrawerCloseButton position={'relative'} fontSize={'sm'} top={0} right={0} />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<DrawerBody overflow={'unset'} px={props?.px}>
|
<DrawerBody overflow={'hidden'} px={props?.px}>
|
||||||
{children}
|
{children}
|
||||||
<Loading loading={isLoading} fixed={false} />
|
<Loading loading={isLoading} fixed={false} />
|
||||||
</DrawerBody>
|
</DrawerBody>
|
||||||
|
@@ -165,7 +165,7 @@ export const useDebug = () => {
|
|||||||
maxW={['90vw', '35vw']}
|
maxW={['90vw', '35vw']}
|
||||||
px={0}
|
px={0}
|
||||||
>
|
>
|
||||||
<Flex flexDirection={'column'} h={'100%'}>
|
<Flex flexDirection={'column'} h={'100%'} overflowY={'auto'}>
|
||||||
<Box flex={'1 0 0'} overflow={'auto'} px={6}>
|
<Box flex={'1 0 0'} overflow={'auto'} px={6}>
|
||||||
{renderInputs.map((input) => {
|
{renderInputs.map((input) => {
|
||||||
const required = input.required || false;
|
const required = input.required || false;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { Box } from '@chakra-ui/react';
|
import { Box, Flex } from '@chakra-ui/react';
|
||||||
import { ImportSourceItemType } from '@/web/core/dataset/type';
|
import { ImportSourceItemType } from '@/web/core/dataset/type';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import MyRightDrawer from '@fastgpt/web/components/common/MyDrawer/MyRightDrawer';
|
import MyRightDrawer from '@fastgpt/web/components/common/MyDrawer/MyRightDrawer';
|
||||||
@@ -83,26 +83,28 @@ const PreviewChunks = ({
|
|||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
maxW={['90vw', '40vw']}
|
maxW={['90vw', '40vw']}
|
||||||
>
|
>
|
||||||
{data.map((item, index) => (
|
<Flex flexDirection={'column'} height={'100%'} overflowY={'auto'}>
|
||||||
<Box
|
{data.map((item, index) => (
|
||||||
key={index}
|
<Box
|
||||||
whiteSpace={'pre-wrap'}
|
key={index}
|
||||||
fontSize={'sm'}
|
whiteSpace={'pre-wrap'}
|
||||||
p={4}
|
fontSize={'sm'}
|
||||||
bg={index % 2 === 0 ? 'white' : 'myWhite.600'}
|
p={4}
|
||||||
mb={3}
|
bg={index % 2 === 0 ? 'white' : 'myWhite.600'}
|
||||||
borderRadius={'md'}
|
mb={3}
|
||||||
borderWidth={'1px'}
|
borderRadius={'md'}
|
||||||
borderColor={'borderColor.low'}
|
borderWidth={'1px'}
|
||||||
boxShadow={'2'}
|
borderColor={'borderColor.low'}
|
||||||
_notLast={{
|
boxShadow={'2'}
|
||||||
mb: 2
|
_notLast={{
|
||||||
}}
|
mb: 2
|
||||||
>
|
}}
|
||||||
<Box color={'myGray.900'}>{item.q}</Box>
|
>
|
||||||
<Box color={'myGray.500'}>{item.a}</Box>
|
<Box color={'myGray.900'}>{item.q}</Box>
|
||||||
</Box>
|
<Box color={'myGray.500'}>{item.a}</Box>
|
||||||
))}
|
</Box>
|
||||||
|
))}
|
||||||
|
</Flex>
|
||||||
</MyRightDrawer>
|
</MyRightDrawer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user