fix(monaco): monaco options not working (#767)

This commit is contained in:
Gene 2024-08-28 18:11:37 +08:00 committed by GitHub
parent 5fa1b2b11c
commit fde6eca787
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -74,7 +74,13 @@ export default {
const initMonaco = (monaco) => {
emit('editorWillMount', vueMonaco.monaco)
const options = { ...defaultOptions, ...props, theme: globalMonacoEditorTheme.value }
const options = {
...defaultOptions,
value: props.value,
theme: globalMonacoEditorTheme.value,
language: props.language,
...props.options
}
if (props.diffEditor) {
vueMonaco.editor = monaco.editor.createDiffEditor(monacoRef.value, options)