From 7dc6d8a9d7289bfaf27f972e9ca1773c0a1ddd7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=87=AF=E9=BE=99?= <502431556@qq.com> Date: Thu, 14 Apr 2022 09:01:06 +0800 Subject: [PATCH] fix: fix the error reported by the Editor component --- src/components/Editor/src/Editor.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index b2a8d13..cd241f2 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -78,10 +78,10 @@ const handleChange = (editor: IDomEditor) => { // 组件销毁时,及时销毁编辑器 onBeforeUnmount(() => { const editor = unref(editorRef.value) - if (editor == null) return + if (editor === null) return // 销毁,并移除 editor - editor.destroy() + editor?.destroy() }) const getEditorRef = async (): Promise => { @@ -110,12 +110,12 @@ watch(