diff --git a/src/EditableMessage/index.tsx b/src/EditableMessage/index.tsx index 2fc4162d..76765afb 100644 --- a/src/EditableMessage/index.tsx +++ b/src/EditableMessage/index.tsx @@ -136,7 +136,7 @@ const EditableMessage = memo( height: isAutoSize ? 'unset' : height, overflowX: 'hidden', overflowY: 'auto', - ...markdownProps.style, + ...markdownProps?.style, }} > {value || placeholder} diff --git a/src/MessageModal/index.tsx b/src/MessageModal/index.tsx index a7437598..d7342a1a 100644 --- a/src/MessageModal/index.tsx +++ b/src/MessageModal/index.tsx @@ -115,10 +115,10 @@ const MessageModal = memo( {...markdownProps} style={ value - ? { ...markdownStyle, ...markdownProps.style } + ? { ...markdownStyle, ...markdownProps?.style } : { ...markdownStyle, - ...markdownProps.style, + ...markdownProps?.style, opacity: 0.5, } } diff --git a/src/ProChat/demos/doc-mode.tsx b/src/ProChat/demos/doc-mode.tsx index a97f4f68..9dc8f415 100644 --- a/src/ProChat/demos/doc-mode.tsx +++ b/src/ProChat/demos/doc-mode.tsx @@ -13,7 +13,7 @@ export default () => { return (
{ const mockedData: string = `这是一段模拟的流式字符串数据。本次会话传入了${messages.length}条消息`;