NameSpace Issue in JointJS version 3

后端 未结 2 1118
长发绾君心
长发绾君心 2021-01-22 13:26

I am trying to convert a legacy app from JointJS v2.2.1 to v3.0.2. I’m hitting an error others have found:

Uncaught Error: dia.ElementView: markup requir

2条回答
  •  不知归路
    2021-01-22 13:37

    I met a similar error saying 'markup required' just today when using jointjs with Vue. I followed the code and found that it is assuming 'joint' is present in global environment. So I add the following line in my code, and the error is gone:

    import * as joint from 'jointjs'
    window.joint = joint
    

    Hopefully this helps.

提交回复
热议问题