😎修复动态插件页面回显代码问题
This commit is contained in:
parent
6d3e5440a7
commit
ddc80c5261
@ -78,8 +78,8 @@
|
|||||||
"vue-router": "^4.5.1",
|
"vue-router": "^4.5.1",
|
||||||
"vue-signature-pad": "^3.0.2",
|
"vue-signature-pad": "^3.0.2",
|
||||||
"vue3-tree-org": "^4.2.2",
|
"vue3-tree-org": "^4.2.2",
|
||||||
"vxe-pc-ui": "^4.8.8",
|
"vxe-pc-ui": "^4.8.9",
|
||||||
"vxe-table": "^4.15.3",
|
"vxe-table": "^4.15.4",
|
||||||
"xe-utils": "^3.7.8",
|
"xe-utils": "^3.7.8",
|
||||||
"xlsx-js-style": "^1.2.0"
|
"xlsx-js-style": "^1.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -79,10 +79,10 @@ const state = reactive({
|
|||||||
|
|
||||||
// 初始化monacoEditor对象
|
// 初始化monacoEditor对象
|
||||||
var monacoEditor: any = null;
|
var monacoEditor: any = null;
|
||||||
const initMonacoEditor = () => {
|
const initMonacoEditor = (code: string) => {
|
||||||
monacoEditor = monaco.editor.create(monacoEditorRef.value, {
|
monacoEditor = monaco.editor.create(monacoEditorRef.value, {
|
||||||
theme: 'vs-dark', // 主题 vs vs-dark hc-black
|
theme: 'vs-dark', // 主题 vs vs-dark hc-black
|
||||||
value: '', // 默认显示的值
|
value: code, // 默认显示的值
|
||||||
language: 'csharp',
|
language: 'csharp',
|
||||||
formatOnPaste: true,
|
formatOnPaste: true,
|
||||||
wordWrap: 'on', //自动换行,注意大小写
|
wordWrap: 'on', //自动换行,注意大小写
|
||||||
@ -114,7 +114,7 @@ const openDialog = (row: any) => {
|
|||||||
|
|
||||||
// 延迟取值防止取不到
|
// 延迟取值防止取不到
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (monacoEditor == null) initMonacoEditor();
|
initMonacoEditor(row.csharpCode);
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user