代码高亮

This commit is contained in:
xuyue committed 2025-02-25 11:02:04 +08:00
1 parent 942c1fb59d
commit 9a289d8c39
10 files changed
+56 -353

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { EditorView } from "@codemirror/view"
import { Codemirror } from "vue-codemirror"
import { smoothy } from "../themes/smoothy.ts"
import { githubLight } from "@fsegurai/codemirror-theme-github-light"
import { css } from "@codemirror/lang-css"
import { javascript } from "@codemirror/lang-javascript"
import { html } from "@codemirror/lang-html"
@@ -45,7 +45,7 @@ const lang = computed(() => {
<Codemirror
v-model="code"
indentWithTab
:extensions="[styleTheme, lang, smoothy]"
:extensions="[styleTheme, lang, githubLight]"
:tabSize="4"
:style="{ height: '100%', fontSize: props.fontSize + 'px' }"
/>