Skip to content

Commit

Permalink
chore: use fontColor variable for primary color
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Aug 29, 2024
1 parent c57ab0e commit d6b5184
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/CodemirrorEditor/EditorHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const {
isDark,
isCiteStatus,
output,
fontColor,
} = storeToRefs(store)
const {
Expand Down Expand Up @@ -121,6 +122,8 @@ function copy() {
.replace(/top:(.*?)em/g, `transform: translateY($1em)`)
// 适配主题中的颜色变量
.replaceAll(`var(--el-text-color-regular)`, `#3f3f3f`)
.replaceAll(`var(--md-primary-color)`, fontColor.value)
.replaceAll(/--md-primary-color:.+?;/g, ``)
clipboardDiv.focus()
window.getSelection().removeAllRanges()
const range = document.createRange()
Expand Down

0 comments on commit d6b5184

Please sign in to comment.