diff --git a/docs/widget/src/components/CommentItem.js b/docs/widget/src/components/CommentItem.js index a1cfb7d..2acb497 100644 --- a/docs/widget/src/components/CommentItem.js +++ b/docs/widget/src/components/CommentItem.js @@ -197,10 +197,10 @@ export class CommentItem extends Component { ] }); - // 设置评论内容的 HTML + // 设置评论内容的 TEXT const contentEl = root.querySelector('.cwd-comment-content'); if (contentEl) { - contentEl.innerHTML = comment.contentHtml; + contentEl.innerHTML = comment.contentText; } // 创建回复编辑器 @@ -343,7 +343,7 @@ export class CommentItem extends Component { const commentId = String(this.props.comment.id); - // 防抖检查:1秒内同一评论只能操作一次 + // 防抖检查:1 秒内同一评论只能操作一次 const now = Date.now(); const debounceKey = `${this.getUserId()}_${commentId}`; const lastClick = CommentItem._likeDebounce.get(debounceKey); @@ -424,7 +424,7 @@ export class CommentItem extends Component { /** * 检查是否已点赞 - * @param {string|number} commentId - 评论ID + * @param {string|number} commentId - 评论 ID * @returns {boolean} 是否已点赞 */ hasLiked(commentId) { diff --git a/docs/widget/src/styles/main.css b/docs/widget/src/styles/main.css index 95cd6d7..1d0ffd1 100644 --- a/docs/widget/src/styles/main.css +++ b/docs/widget/src/styles/main.css @@ -395,6 +395,7 @@ line-height: 1.6; color: var(--cwd-text, #24292f); word-wrap: break-word; + white-space: pre-wrap; margin-top: 10px; } @@ -573,9 +574,11 @@ 0% { transform: scale(1); } + 50% { transform: scale(1.2); } + 100% { transform: scale(1.05); } @@ -980,4 +983,4 @@ background: transparent; padding: 0; color: #db850d; -} +} \ No newline at end of file