Commit 143a6884 authored by tyyin lan's avatar tyyin lan

fix(首页): 富文本编辑器输入合成时和placeholder产生文本叠加

parent b8c8e9a9
...@@ -108,6 +108,18 @@ watch(showTemplateMenu, (isShow) => { ...@@ -108,6 +108,18 @@ watch(showTemplateMenu, (isShow) => {
watchEffect(() => { watchEffect(() => {
if (quillInst.value) { if (quillInst.value) {
quillInst.value.on('text-change', onQuillTextChange) quillInst.value.on('text-change', onQuillTextChange)
quillInst.value.on('composition-start', () => {
if (quillInst.value) {
quillInst.value.root.dataset.placeholder = ''
}
})
quillInst.value.on('composition-end', () => {
if (quillInst.value) {
quillInst.value.root.dataset.placeholder = quillInst.value.options.placeholder
}
})
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment