开发: 添加小屏幕css[少], 聊天记录投票. 客户中心修改, 工作台支持小屏
This commit is contained in:
@@ -7,13 +7,16 @@ type IProps = {
|
||||
export const EmojiFormat: React.FC<IProps> = (props) => {
|
||||
const format = () => {
|
||||
let txt = props.content;
|
||||
emoji.forEach((item) => {
|
||||
const reg = new RegExp(`\\[${item}\\]`, 'g');
|
||||
txt = txt.replace(
|
||||
reg,
|
||||
`<img style="width: 24px;height:24px" src="/api/assets/wechat/emoji/${item}.png" alt="" />`,
|
||||
);
|
||||
});
|
||||
if (txt.includes('[') && txt.includes(']')) {
|
||||
emoji.forEach((item) => {
|
||||
const reg = new RegExp(`\\[${item}\\]`, 'g');
|
||||
txt = txt.replace(
|
||||
reg,
|
||||
`<img style="width: 24px;height:24px" src="/api/assets/wechat/emoji/${item}.png" alt="" />`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return txt;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user