From bb11f1ced9fd957abccc6b08b92ba9dab5a17182 Mon Sep 17 00:00:00 2001 From: anghunk Date: Mon, 26 Jan 2026 21:04:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(CommentItem):=20=E4=BF=AE=E5=A4=8D=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将评论内容从文本格式修改为HTML格式,以支持富文本显示。 style(main.css): 优化CSS样式。 - 调整内边距并添加边框样式,改善视觉效果。 --- docs/widget/src/components/CommentItem.js | 2 +- docs/widget/src/styles/main.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/widget/src/components/CommentItem.js b/docs/widget/src/components/CommentItem.js index 2acb497..9a36ace 100644 --- a/docs/widget/src/components/CommentItem.js +++ b/docs/widget/src/components/CommentItem.js @@ -200,7 +200,7 @@ export class CommentItem extends Component { // 设置评论内容的 TEXT const contentEl = root.querySelector('.cwd-comment-content'); if (contentEl) { - contentEl.innerHTML = comment.contentText; + contentEl.innerHTML = comment.contentHtml; } // 创建回复编辑器 diff --git a/docs/widget/src/styles/main.css b/docs/widget/src/styles/main.css index 1d0ffd1..256f8f5 100644 --- a/docs/widget/src/styles/main.css +++ b/docs/widget/src/styles/main.css @@ -372,9 +372,10 @@ background: #fff8c5; color: #9a6700; border-radius: 3px; - padding: 1px 4px; + padding: 0 6px; font-size: 12px; margin: 0 4px; + border: 1px solid #9a6700; } .cwd-reply-to-separator {