From 164ef678baca458d3aa24f3ec0b3b69e7e5d64f0 Mon Sep 17 00:00:00 2001 From: anghunk Date: Wed, 21 Jan 2026 15:52:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(comments):=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E7=BB=84=E4=BB=B6=E5=A4=B4=E9=83=A8=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=9A=84=E7=B1=BB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将评论组件头部的类名从`.cwd-header`和`.cwd-count-number`统一修改为`.cwd-comments-header`和`.cwd-comments-count-number`,提高代码可读性和一致性 --- cwd-admin/widget/src/core/CWDComments.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cwd-admin/widget/src/core/CWDComments.js b/cwd-admin/widget/src/core/CWDComments.js index 8779dd9..f007535 100644 --- a/cwd-admin/widget/src/core/CWDComments.js +++ b/cwd-admin/widget/src/core/CWDComments.js @@ -281,7 +281,7 @@ export class CWDComments { } // 创建头部统计 - let header = this.mountPoint.querySelector('.cwd-header'); + let header = this.mountPoint.querySelector('.cwd-comments-header'); if (!header) { header = document.createElement('div'); header.className = 'cwd-comments-header'; @@ -292,7 +292,7 @@ export class CWDComments { `; this.mountPoint.appendChild(header); } - const countEl = header.querySelector('.cwd-count-number'); + const countEl = header.querySelector('.cwd-comments-count-number'); if (countEl) { countEl.textContent = state.pagination.totalCount; } @@ -400,8 +400,8 @@ export class CWDComments { } // 更新头部统计 - const header = this.mountPoint?.querySelector('.cwd-header'); - const countEl = header?.querySelector('.cwd-count-number'); + const header = this.mountPoint?.querySelector('.cwd-comments-header'); + const countEl = header?.querySelector('.cwd-comments-count-number'); if (countEl) { countEl.textContent = state.pagination.totalCount; }