开发: 添加小屏幕css[少], 聊天记录投票. 客户中心修改, 工作台支持小屏

This commit is contained in:
zhengw
2023-04-21 14:53:54 +08:00
parent 2156976a8c
commit 5f4acf4317
20 changed files with 619 additions and 322 deletions

View File

@@ -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;
};