Commit 09c9f8a881d1f2c76b11fdeff08f3ca2893e0886
1 parent
8f332e3c
fix(tinymce): the editor reports an error under keep-alive #152
Showing
1 changed file
with
2 additions
and
0 deletions
src/components/Tinymce/src/Editor.vue
@@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
92 | } | 92 | } |
93 | ); | 93 | ); |
94 | onMountedOrActivated(() => { | 94 | onMountedOrActivated(() => { |
95 | + tinymceId.value = snowUuid('tiny-vue'); | ||
95 | nextTick(() => { | 96 | nextTick(() => { |
96 | init(); | 97 | init(); |
97 | }); | 98 | }); |
@@ -152,6 +153,7 @@ | @@ -152,6 +153,7 @@ | ||
152 | function bindModelHandlers(editor: any) { | 153 | function bindModelHandlers(editor: any) { |
153 | const modelEvents = attrs.modelEvents ? attrs.modelEvents : null; | 154 | const modelEvents = attrs.modelEvents ? attrs.modelEvents : null; |
154 | const normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents; | 155 | const normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents; |
156 | + | ||
155 | watch( | 157 | watch( |
156 | () => props.modelValue, | 158 | () => props.modelValue, |
157 | (val: string, prevVal: string) => { | 159 | (val: string, prevVal: string) => { |