mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-22 03:45:52 +00:00
fix: quote display error (#2298)
This commit is contained in:
@@ -12,6 +12,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
|
|||||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||||
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||||
import { addStatisticalDataToHistoryItem } from '@/global/core/chat/utils';
|
import { addStatisticalDataToHistoryItem } from '@/global/core/chat/utils';
|
||||||
|
import { useSize } from 'ahooks';
|
||||||
|
|
||||||
const QuoteModal = dynamic(() => import('./QuoteModal'));
|
const QuoteModal = dynamic(() => import('./QuoteModal'));
|
||||||
const ContextModal = dynamic(() => import('./ContextModal'));
|
const ContextModal = dynamic(() => import('./ContextModal'));
|
||||||
@@ -55,6 +56,7 @@ const ResponseTags = ({
|
|||||||
onOpen: onOpenContextModal,
|
onOpen: onOpenContextModal,
|
||||||
onClose: onCloseContextModal
|
onClose: onCloseContextModal
|
||||||
} = useDisclosure();
|
} = useDisclosure();
|
||||||
|
useSize(quoteListRef);
|
||||||
const quoteIsOverflow = quoteListRef.current
|
const quoteIsOverflow = quoteListRef.current
|
||||||
? quoteListRef.current.scrollHeight > (isPc ? 50 : 55)
|
? quoteListRef.current.scrollHeight > (isPc ? 50 : 55)
|
||||||
: true;
|
: true;
|
||||||
@@ -84,7 +86,7 @@ const ResponseTags = ({
|
|||||||
<>
|
<>
|
||||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||||
<Box width={'100%'}>
|
<Box width={'100%'}>
|
||||||
<ChatBoxDivider icon="core/chat/quoteFill" text={t('common:core.chat.Quote')} />{' '}
|
<ChatBoxDivider icon="core/chat/quoteFill" text={t('common:core.chat.Quote')} />
|
||||||
</Box>
|
</Box>
|
||||||
{quoteFolded && quoteIsOverflow && (
|
{quoteFolded && quoteIsOverflow && (
|
||||||
<MyIcon
|
<MyIcon
|
||||||
|
Reference in New Issue
Block a user