change code editor to codemirror.

This commit is contained in:
2023-04-07 10:00:29 +08:00
parent 007de440d6
commit 0862b0ff91
14 changed files with 335 additions and 2744 deletions

View File

@@ -2,7 +2,7 @@
import { isDesktop } from "~/shared/composables/breakpoints"
import { code } from "~/shared/composables/learn"
const Monaco = defineAsyncComponent(() => import("~/shared/Monaco.vue"))
const CodeEditor = defineAsyncComponent(() => import("~/shared/CodeEditor.vue"))
const route = useRoute()
const router = useRouter()
@@ -57,7 +57,7 @@ function next() {
</n-scrollbar>
</n-gi>
<n-gi :span="14">
<Monaco v-model:value="code" />
<CodeEditor v-model:value="code" />
</n-gi>
</n-grid>
<div v-else>
@@ -72,7 +72,7 @@ function next() {
</n-button>
</n-space>
</n-scrollbar>
<Monaco v-model:value="code" height="calc(50vh - 42px)" />
<CodeEditor v-model:value="code" height="calc(50vh - 42px)" />
</div>
</template>