diff --git a/docs/.vitepress/components/footerDoc.vue b/docs/.vitepress/components/footerDoc.vue index fc0e2d9..adad0bd 100644 --- a/docs/.vitepress/components/footerDoc.vue +++ b/docs/.vitepress/components/footerDoc.vue @@ -3,9 +3,14 @@ diff --git a/docs/widget/src/core/CWDComments.js b/docs/widget/src/core/CWDComments.js index 24071fd..98c9559 100644 --- a/docs/widget/src/core/CWDComments.js +++ b/docs/widget/src/core/CWDComments.js @@ -126,9 +126,8 @@ export class CWDComments { this.mountPoint = document.createElement('div'); this.mountPoint.className = 'cwd-comments-container'; this.shadowRoot.appendChild(this.mountPoint); - if (this.config.theme) { - this.mountPoint.setAttribute('data-theme', this.config.theme); - } + const theme = this.config.theme || 'light'; + this.mountPoint.setAttribute('data-theme', theme); this._applyCustomCss(); } diff --git a/docs/widget/src/styles/main.css b/docs/widget/src/styles/main.css index 84c1c3a..1cd979b 100644 --- a/docs/widget/src/styles/main.css +++ b/docs/widget/src/styles/main.css @@ -41,7 +41,6 @@ .cwd-comments-header { padding: 16px 0; - border-bottom: 1px solid var(--cwd-border); } .cwd-comments-count { diff --git a/docs/widget/src/styles/variables.css b/docs/widget/src/styles/variables.css index 0940a51..4233612 100644 --- a/docs/widget/src/styles/variables.css +++ b/docs/widget/src/styles/variables.css @@ -3,7 +3,7 @@ * 支持主题切换 */ -:root, +.cwd-comments-container, [data-theme="light"] { /* 主色调 */ --cwd-primary: #0969da;