diff --git a/src/components/ma-codeEditor/index.vue b/src/components/ma-codeEditor/index.vue index aa500e70..8994e5fc 100644 --- a/src/components/ma-codeEditor/index.vue +++ b/src/components/ma-codeEditor/index.vue @@ -98,7 +98,7 @@ onMounted(() => { instance = monaco.editor.create(dom.value, options) initEditorValue() - instance.onDidChangeModelContent(() => { + instance.onDidBlurEditorText(() => { emit('update:modelValue', toRaw(props.valueType === 'value' ? instance.getValue() : instance.getModel())) }) }) @@ -114,4 +114,4 @@ defineExpose({ getInstance, initEditorValue }) border-radius: 3px; background: var(--color-bg-2); } - \ No newline at end of file +