From 335ba558ab9aac8016b858a20eb69826b49ac56e Mon Sep 17 00:00:00 2001 From: 0Xcat Date: Fri, 9 May 2025 14:59:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A6=E5=BA=95=E6=BB=9A=E5=8A=A8=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Chat/index.tsx | 2 ++ src/components/MessageContainer/index.tsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Chat/index.tsx b/src/components/Chat/index.tsx index 9d5a3b4..c9dd89d 100644 --- a/src/components/Chat/index.tsx +++ b/src/components/Chat/index.tsx @@ -178,6 +178,7 @@ export const Chat = React.forwardRef((props, ref) => rightAction, Composer = DComposer, isX, + nearBottomThreshold } = props; const [currentColorScheme, setCurrentColorScheme] = useState<'light' | 'dark'>('light'); @@ -252,6 +253,7 @@ export const Chat = React.forwardRef((props, ref) => onScroll={onScroll} onBackBottomShow={onBackBottomShow} onBackBottomClick={onBackBottomClick} + nearBottomThreshold={nearBottomThreshold} />
{renderQuickReplies ? ( diff --git a/src/components/MessageContainer/index.tsx b/src/components/MessageContainer/index.tsx index 2e4d48d..a247cd1 100644 --- a/src/components/MessageContainer/index.tsx +++ b/src/components/MessageContainer/index.tsx @@ -19,6 +19,7 @@ export interface MessageContainerProps { renderBeforeMessageList?: () => React.ReactNode; onBackBottomShow?: () => void; onBackBottomClick?: () => void; + nearBottomThreshold?: number; } export interface MessageContainerHandle { @@ -43,6 +44,7 @@ export const MessageContainer = React.forwardRef