开发: 群图标拼接, 聊天记录样式修复

This commit is contained in:
zhengw
2023-04-24 10:54:22 +08:00
parent 42418046e8
commit 570b28d81b
12 changed files with 107 additions and 45 deletions

View File

@@ -12,7 +12,7 @@ export const EmojiFormat: React.FC<IProps> = (props) => {
const reg = new RegExp(`\\[${item}\\]`, 'g');
txt = txt.replace(
reg,
`<img style="width: 24px;height:24px" src="/api/assets/wechat/emoji/${item}.png" alt="" />`,
`<img style="width: 24px;height:24px;vertical-align: bottom;" src="/api/assets/wechat/emoji/${item}.png" alt="" />`,
);
});
}
@@ -23,10 +23,7 @@ export const EmojiFormat: React.FC<IProps> = (props) => {
return (
<>
{typeof props.content === 'string' ? (
<span
style={{ display: 'inline-flex', flexWrap: 'wrap' }}
dangerouslySetInnerHTML={{ __html: format() }}
></span>
<div dangerouslySetInnerHTML={{ __html: format() }}></div>
) : (
props.content
)}