由于某种原因,QuillJS选择更改缓存结果

我有:

    useEffect(() => {
        if (quill) {
            quill.clipboard.dangerouslyPasteHTML(documentContent);
            quill.on('text-change', () => {
                setDocumentContent(quill.root.innerHTML);
            });

            quill.on('selection-change', (range, oldRange, source) => {
                console.log(documentState?.predictionStatus, range, oldRange, source);
            })

        }
    }, [quill]);

documentState.predictionStatus保持其原始值。我想也许是因为该值以某种方式缓存了?

有什么办法解决?

谢谢!

以上是由于某种原因,QuillJS选择更改缓存结果的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>