From 5bc3c9090bedd6af056b482592d97bbcdb73cf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=A1=82=E5=BF=97?= <3300529038@qq.com> Date: Fri, 10 Oct 2025 18:20:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Editor=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=20readonly=20=E6=97=B6=E5=8F=AA=E8=AF=BB=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=97=A0=E6=95=88=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/src/Editor.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index c1f07cf9b..207ab8020 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -58,6 +58,16 @@ watch( emit('update:modelValue', val) } ) +watch( + () => props.readonly, + (val) => { + if (val) { + editorRef.value?.disable() + } else { + editorRef.value?.enable() + } + } +) const handleCreated = (editor: IDomEditor) => { editorRef.value = editor