update async

This commit is contained in:
Qiuxia Fan 2022-05-31 10:27:37 +08:00
parent 26bb30353b
commit 97da665904

View File

@ -29,10 +29,9 @@ const demandLogStore = useDemandLogStore();
const monacoInstance = ref(); const monacoInstance = ref();
const logContent = ref<Nullable<HTMLDivElement>>(null); const logContent = ref<Nullable<HTMLDivElement>>(null);
onMounted(() => { onMounted(async () => {
import("monaco-editor/esm/vs/editor/editor.api").then((monaco) => { const monaco = await import("monaco-editor/esm/vs/editor/editor.api");
monacoInstanceGen(monaco); monacoInstanceGen(monaco);
});
}); });
function monacoInstanceGen(monaco: any) { function monacoInstanceGen(monaco: any) {
const value = demandLogStore.logs.map((d: Log) => d.content).join("\n"); const value = demandLogStore.logs.map((d: Log) => d.content).join("\n");