diff --git a/src/components/CodemirrorEditor/EditorHeader/index.vue b/src/components/CodemirrorEditor/EditorHeader/index.vue index 56be49a..73aa20a 100644 --- a/src/components/CodemirrorEditor/EditorHeader/index.vue +++ b/src/components/CodemirrorEditor/EditorHeader/index.vue @@ -122,10 +122,10 @@ function copy() { // 公众号不支持 position, 转换为等价的 translateY .replace(/top:(.*?)em/g, `transform: translateY($1em)`) // 适配主题中的颜色变量 - .replaceAll(`hsl(var(--foreground))`, `#3f3f3f`) - .replaceAll(`var(--blockquote-background)`, `#f7f7f7`) - .replaceAll(`var(--md-primary-color)`, primaryColor.value) - .replaceAll(/--md-primary-color:.+?;/g, ``) + .replace(/hsl\(var\(--foreground\)\)/g, `#3f3f3f`) + .replace(/var\(--blockquote-background\)/g, `#f7f7f7`) + .replace(/var\(--md-primary-color\)/g, primaryColor.value) + .replace(/--md-primary-color:.+?;/g, ``) .replace(/]*)>]*>(.*?)<\/p><\/span>/g, `$2`) clipboardDiv.focus() @@ -219,10 +219,10 @@ const formatOptions = ref([`rgb`, `hex`, `hsl`, `hsv`]) - - diff --git a/src/components/CodemirrorEditor/PostSlider.vue b/src/components/CodemirrorEditor/PostSlider.vue index ac0c75b..a0b7263 100644 --- a/src/components/CodemirrorEditor/PostSlider.vue +++ b/src/components/CodemirrorEditor/PostSlider.vue @@ -121,7 +121,7 @@ function delPost() { :class="{ 'bg-primary text-primary-foreground': store.currentPostIndex === index, }" - class="hover:text-primary-foreground hover:bg-primary/90 dark:bg-muted dark:hover:bg-muted h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:text-white" + class="hover:bg-primary/90 hover:text-primary-foreground dark:bg-muted dark:hover:bg-muted h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:text-white" @click="store.currentPostIndex = index" > {{ post.title }} diff --git a/src/components/CodemirrorEditor/UploadImgDialog.vue b/src/components/CodemirrorEditor/UploadImgDialog.vue index 538cd3d..61f0155 100644 --- a/src/components/CodemirrorEditor/UploadImgDialog.vue +++ b/src/components/CodemirrorEditor/UploadImgDialog.vue @@ -691,6 +691,7 @@ function onDrop(e: DragEvent) {