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(