From 50ac65fd1167134f5a55c0dc3f75f65982c29649 Mon Sep 17 00:00:00 2001 From: KUN1007 Date: Tue, 2 May 2023 01:01:00 +0800 Subject: [PATCH] Fix BUG --- src/views/edit/index.vue | 6 +++++- src/views/login/index.vue | 29 +++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/views/edit/index.vue b/src/views/edit/index.vue index e1745640..ab760b33 100644 --- a/src/views/edit/index.vue +++ b/src/views/edit/index.vue @@ -7,6 +7,9 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue"; // 编辑器实例,必须用 shallowRef const editorRef = shallowRef(); +// 编辑器的模式 +const mode = "default" + // 内容 HTML const valueHtml = ref("

hello

"); @@ -27,7 +30,8 @@ onBeforeUnmount(() => { editor.destroy(); }); -const handleCreated = (editor) => { +// TODO: +const handleCreated = (editor: any) => { editorRef.value = editor; // 记录 editor 实例,重要! }; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index beb5016c..72193b3b 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,28 +1,20 @@