From 09c9f8a881d1f2c76b11fdeff08f3ca2893e0886 Mon Sep 17 00:00:00 2001 From: vben Date: Thu, 31 Dec 2020 22:33:38 +0800 Subject: [PATCH] fix(tinymce): the editor reports an error under keep-alive #152 --- src/components/Tinymce/src/Editor.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue index 3c4071f0..a58df7aa 100644 --- a/src/components/Tinymce/src/Editor.vue +++ b/src/components/Tinymce/src/Editor.vue @@ -92,6 +92,7 @@ } ); onMountedOrActivated(() => { + tinymceId.value = snowUuid('tiny-vue'); nextTick(() => { init(); }); @@ -152,6 +153,7 @@ function bindModelHandlers(editor: any) { const modelEvents = attrs.modelEvents ? attrs.modelEvents : null; const normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents; + watch( () => props.modelValue, (val: string, prevVal: string) => {