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 logContent = ref<Nullable<HTMLDivElement>>(null);
onMounted(() => {
import("monaco-editor/esm/vs/editor/editor.api").then((monaco) => {
monacoInstanceGen(monaco);
});
onMounted(async () => {
const monaco = await import("monaco-editor/esm/vs/editor/editor.api");
monacoInstanceGen(monaco);
});
function monacoInstanceGen(monaco: any) {
const value = demandLogStore.logs.map((d: Log) => d.content).join("\n");