From fc97b01f84142368396f602dd6f5f9521cefd3db Mon Sep 17 00:00:00 2001 From: mingchiuli Date: Sat, 29 Jun 2024 20:16:12 +0800 Subject: [PATCH] test --- src/components/sys/EditorItem.vue | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/sys/EditorItem.vue b/src/components/sys/EditorItem.vue index a469bdf9..6278fb5f 100644 --- a/src/components/sys/EditorItem.vue +++ b/src/components/sys/EditorItem.vue @@ -5,7 +5,7 @@ import 'md-editor-v3/lib/style.css' import '@vavt/v3-extension/lib/asset/ExportPDF.css' import { ExportPDF, Emoji } from '@vavt/v3-extension' import '@vavt/v3-extension/lib/asset/Emoji.css' -import { ref } from 'vue' +import { onMounted, ref } from 'vue' const emit = defineEmits<{ composing: [payload: boolean] @@ -26,17 +26,22 @@ const toolbars: ToolbarNames[] = [ ] const footers: Footers[] = ['markdownTotal', '=', 0, 'scrollSwitch'] + console.log("!!!!!!!!!", editorRef.value) -editorRef.value?.domEventHandlers({ - compositionstart: () => { - console.log("composing start") - emit('composing', true) - }, - compositionend: () => { - console.log("composing end") - emit('composing', false) - } -}); +onMounted(() => { + console.log("!!!!!!!!!", editorRef.value) + editorRef.value?.domEventHandlers({ + compositionstart: () => { + console.log("composing start") + emit('composing', true) + }, + compositionend: () => { + console.log("composing end") + emit('composing', false) + } + }); +}) + const onUploadImg = async (files: File[], callback: Function) => { const formdata = new FormData()