From 48598b514f301668874a4959f072e463f187350a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Apr 2024 03:45:23 -0400 Subject: [PATCH] =?UTF-8?q?onDidChangeModelContent=E4=BC=9A=E9=80=A0?= =?UTF-8?q?=E6=88=90=E8=BE=93=E5=85=A5=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E5=85=89=E6=A0=87=E5=9B=9E=E5=88=B0=E5=8E=9F=E7=82=B9=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BAonDidBlurEditorText=E5=A4=B1=E5=8E=BB?= =?UTF-8?q?=E7=84=A6=E7=82=B9=E6=9B=B4=E6=96=B0value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ma-codeEditor/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ma-codeEditor/index.vue b/src/components/ma-codeEditor/index.vue index aa500e7..8994e5f 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 + -- Gitee