wangeditor-team / wangEditor

wangEditor —— 开源 Web 富文本编辑器
http://www.wangeditor.com/
MIT License
17.39k stars 3.31k forks source link

报错Uncaught TypeError: Object(...) is not a function #5342

Open blacksmithteam opened 1 year ago

blacksmithteam commented 1 year ago

vue 2.6.11 vuex 3.6.2 @wangeditor/editor 5.1.23 @wangeditor/editor-for-vue 1.0.2

引入了自定义扩展插件就报错 Uncaught TypeError: Object(...) is not a function at Object.isElement (index.es.js?43f8:767:1) at Object.getNodeType (index.esm.js?4a61:23:1) at match (selecttitle.js?67b2:52:1) at Object.nodes (index.esm.js?cb23:7:1) at nodes.next () at _iterableToArrayLimit (iterableToArrayLimit.js?09f0:12:1) at _slicedToArray (slicedToArray.js?3835:6:1) at SelectTitleMenu.getValue (selecttitle.js?67b2:50:1) at e.setSelectedValue (index.esm.js?cb23:39:1) at e.changeMenuState (index.esm.js?cb23:39:1)

同样的自定义插件我在nuxt下是正常的,这个是跟vue版本哪里有冲突吗? 定位到错误位置好像是用到 DomEditor SlateEditor…… 都会出错

bl-sky commented 1 year ago

我也碰到了类似问题,按照官方文档的demo运行就报Object(...)is not a function

hoongs1314 commented 1 year ago

把vue升级到最新版本就好了 npm install vue@next