fix: 解决编辑器不能正常执行worker的问题

This commit is contained in:
奔跑的面条
2022-07-06 14:40:35 +08:00
parent 9e6873e1da
commit 33d78ffcda
4 changed files with 25 additions and 26 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
<template>
<div ref="el" class="editor-area" :style="{ width, height }"></div>
<EditorWorker></EditorWorker>
</template>
<script lang="ts" setup>
import { onMounted, watch, PropType } from 'vue'
import { useMonacoEditor } from './index.hook'
import { EditorWorker } from './index'
const props = defineProps({
width: {
@@ -17,7 +19,7 @@ const props = defineProps({
},
language: {
type: String as PropType<string>,
default: 'javascript'
default: 'typescript'
},
preComment: {
type: String as PropType<string>,