diff --git a/src/ChatItem/index.tsx b/src/ChatItem/index.tsx index 01ff209..eac8068 100644 --- a/src/ChatItem/index.tsx +++ b/src/ChatItem/index.tsx @@ -37,6 +37,7 @@ const ChatItem = memo((props) => { errorMessage, chatItemRenderConfig, onDoubleClick, + originData = {}, ...restProps } = props; const { mobile } = useResponsive(); @@ -55,7 +56,7 @@ const ChatItem = memo((props) => { const dom = ( ((props) => { /> ); return chatItemRenderConfig?.avatarRender?.(props, dom) || dom; - }, [avatar, placement, mobile, loading]); + }, [originData.avatar, placement, mobile, loading]); const messageContentDom = useMemo(() => { if (chatItemRenderConfig?.contentRender === false) return null; diff --git a/src/ProChat/container/index.tsx b/src/ProChat/container/index.tsx index 64c9d4e..a76527f 100644 --- a/src/ProChat/container/index.tsx +++ b/src/ProChat/container/index.tsx @@ -15,6 +15,7 @@ export interface ProChatProps> extends ChatProps = Record>({ @@ -24,11 +25,19 @@ export function ProChat = Record>({ style, className, chatItemRenderConfig, + appStyle, ...props }: ProChatProps) { return ( - +