From bdb7fdc3a3754a3b70a0d534b0bfc8731d6123da Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 11 Oct 2023 09:33:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ts=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tinymce/src/Editor.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue index 2c66e2d5..963a4831 100644 --- a/src/components/Tinymce/src/Editor.vue +++ b/src/components/Tinymce/src/Editor.vue @@ -209,7 +209,7 @@ function initSetup(e) { bindHandlers(e, attrs, unref(editorRef)) } -function setValue(editor: Recordable, val: string, prevVal?: string) { +function setValue(editor: Recordable, val?: string, prevVal?: string) { if (editor && typeof val === 'string' && val !== prevVal && val !== editor.getContent({ format: attrs.outputFormat })) editor.setContent(val) } @@ -220,14 +220,14 @@ function bindModelHandlers(editor: any) { watch( () => props.modelValue, - (val: string, prevVal: string) => { + (val, prevVal) => { setValue(editor, val, prevVal) }, ) watch( () => props.value, - (val: string, prevVal: string) => { + (val, prevVal) => { setValue(editor, val, prevVal) }, { @@ -273,14 +273,8 @@ function getUploadingImgName(name: string) {