vue和 jsplumb 集成 出现下面的错误

TypeError: Cannot read property 'parentNode' of null
    at DragManager.endpointAdded (jsplumb.js?ea57:6557)
    at _newEndpoint (jsplumb.js?ea57:4145)
    at root.jsPlumbInstance.addEndpoint (jsplumb.js?ea57:4355)
    at eval (SystemManagement.vue?09cf:126)
    at root.jsPlumbInstance.batch (jsplumb.js?ea57:6223)
    at VueComponent.createFlow (SystemManagement.vue?09cf:111)
    at VueComponent.boundFn [as createFlow] (vue.esm.js?5425:190)
    at eval (SystemManagement.vue?09cf:181)
    at root.jsPlumbInstance.bind (jsplumb.js?ea57:3687)

    at root.jsPlumbInstance.ready (jsplumb.js?ea57:5903)


在jsplumb 页面 F5 刷新就可以避免这个错,如果是从其他页面跳过来 就会出现这个问题 。


看到网络上说 是 id  有重复值引起 的  ,目前还没有检测到id到底是不是有问题 <------ 不是问题的答案


经过跟高手对话 ,应该是数据在加载时候 生命周期的问题 ,

在原来的版本中使用的是created 钩子 ,

换用mounted 后就可以了 ,

那么 这两个钩子到底是有什么差别呢 ?

准备另外写一篇文章尝试解析下 ,everybody morning

posted @ 2018-02-28 19:46  yuerspring  阅读(780)  评论(0编辑  收藏  举报