refactor: 数据库表支持editor编辑调整

This commit is contained in:
meilin.huang
2023-12-22 12:29:46 +08:00
parent 54a0f0b3c7
commit 2b419bca11
7 changed files with 252 additions and 70 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div>
<el-dialog :title="state.title" v-model="state.dialogVisible" :width="state.width" @close="cancel">
<monaco-editor ref="editorRef" :height="state.height" class="editor" :language="state.language" v-model="contentValue" />
<monaco-editor ref="editorRef" :height="state.height" class="editor" :language="state.language" v-model="contentValue" can-change-mode />
<template #footer>
<span class="dialog-footer">
<el-button @click="cancel">取消</el-button>
@@ -120,6 +120,7 @@ const open = (optionProps: MonacoEditorDialogProps) => {
setTimeout(() => {
editorRef.value?.format();
editorRef.value?.focus();
}, 300);
state.dialogVisible = true;