fix(editor): broken color buttons after modelValue update

pull/7097/head
Jakub Michálek 2025-01-14 15:58:07 +01:00
parent 7f3fb4a6c1
commit 06316c56b6
1 changed files with 1 additions and 7 deletions

View File

@ -19,7 +19,7 @@
<button class="ql-italic" type="button" v-bind="ptm('italic')"></button>
<button class="ql-underline" type="button" v-bind="ptm('underline')"></button>
</span>
<span :key="reRenderColorKey" class="ql-formats" v-bind="ptm('formats')">
<span class="ql-formats" v-bind="ptm('formats')">
<select class="ql-color" v-bind="ptm('color')"></select>
<select class="ql-background" v-bind="ptm('background')"></select>
</span>
@ -64,16 +64,10 @@ export default {
extends: BaseEditor,
inheritAttrs: false,
emits: ['text-change', 'selection-change', 'load'],
data() {
return {
reRenderColorKey: 0
};
},
quill: null,
watch: {
modelValue(newValue, oldValue) {
if (newValue !== oldValue && this.quill && !this.quill.hasFocus()) {
this.reRenderColorKey++;
this.renderValue(newValue);
}
},