fix: chunk preview drawer can not scroll, common drawer content scroll should decide by content; (#1539)

This commit is contained in:
Cheer
2024-05-22 10:18:21 +08:00
committed by GitHub
parent a14a8ae627
commit 87e4afe89b
3 changed files with 25 additions and 23 deletions

View File

@@ -67,7 +67,7 @@ const MyRightDrawer = ({
<DrawerCloseButton position={'relative'} fontSize={'sm'} top={0} right={0} />
</Flex>
<DrawerBody overflow={'unset'} px={props?.px}>
<DrawerBody overflow={'hidden'} px={props?.px}>
{children}
<Loading loading={isLoading} fixed={false} />
</DrawerBody>

View File

@@ -165,7 +165,7 @@ export const useDebug = () => {
maxW={['90vw', '35vw']}
px={0}
>
<Flex flexDirection={'column'} h={'100%'}>
<Flex flexDirection={'column'} h={'100%'} overflowY={'auto'}>
<Box flex={'1 0 0'} overflow={'auto'} px={6}>
{renderInputs.map((input) => {
const required = input.required || false;

View File

@@ -1,5 +1,5 @@
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 { useQuery } from '@tanstack/react-query';
import MyRightDrawer from '@fastgpt/web/components/common/MyDrawer/MyRightDrawer';
@@ -83,6 +83,7 @@ const PreviewChunks = ({
isLoading={isLoading}
maxW={['90vw', '40vw']}
>
<Flex flexDirection={'column'} height={'100%'} overflowY={'auto'}>
{data.map((item, index) => (
<Box
key={index}
@@ -103,6 +104,7 @@ const PreviewChunks = ({
<Box color={'myGray.500'}>{item.a}</Box>
</Box>
))}
</Flex>
</MyRightDrawer>
);
};