开发: 群图标拼接, 聊天记录样式修复
This commit is contained in:
@@ -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
|
||||
)}
|
||||
|
Reference in New Issue
Block a user