|
|
|
@ -34,7 +34,7 @@ const Messages = () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const RenderText = memo(function renderText({str}) {
|
|
|
|
|
const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji_Presentation})/gmu);
|
|
|
|
|
const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji_Presentation})/gmu).filter(s => s !== '');
|
|
|
|
|
// const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji}\uFE0F?|\b\d+\b)/gu);
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
@ -50,10 +50,10 @@ const Messages = () => {
|
|
|
|
|
{part}
|
|
|
|
|
</a>
|
|
|
|
|
);
|
|
|
|
|
// } else if (part.trim() !== '') {
|
|
|
|
|
// return <span key={`${part}${index}`}>{part}</span>;
|
|
|
|
|
} else if (part.trim() !== '') {
|
|
|
|
|
return <span key={`${part}${index}`}>{part}</span>;
|
|
|
|
|
} else {
|
|
|
|
|
return <>{part}</>; // <span key={`${part}${index}`}>{part}</span>;
|
|
|
|
|
return <span key={`${part}${index}`}>{part}</span>;
|
|
|
|
|
}
|
|
|
|
|
})}
|
|
|
|
|
</>
|
|
|
|
@ -65,7 +65,7 @@ const Messages = () => {
|
|
|
|
|
<Spin spinning={msgListLoading} tip={'正在读取...'} wrapperClassName='pt-8 '>
|
|
|
|
|
{activeMessages.map((message, index) => (
|
|
|
|
|
<Dropdown
|
|
|
|
|
key={message.key}
|
|
|
|
|
key={message.id}
|
|
|
|
|
menu={{
|
|
|
|
|
items: [{ label: '回复', key: 'reply', disabled: !['text'].includes(message.whatsapp_msg_type) }],
|
|
|
|
|
onClick: ({ key, domEvent }) => {
|
|
|
|
|