vue2—vue-quill-editor插件报错并解决【更新修改】
1、说明:使用vue-quill-editor插件提示报错:
[Deprecation] Listener added for a ‘DOMNodeInserted’ mutation event. Support for this event type has been removed, and this event will no longer be fired. See for more information.
2、解释:该插件已经弃用,不在维护
3、办法:需要更改node_modules文件里的quill文件里面的代码。
具体的文件路径图片:
代码修改第4237行:
_this.domNode.addEventListener('DOMNodeInserted', function () { });
修改为:
new MutationObserver(() => {}).observe(_this.domNode, { childList: true });
这样报错就没有了,现在git上已经显示了quill后续不维护,以后可能会有更多的适配问题,所以最好之后的项目富文本插件使用需要另外找新的了。