详细错误如下:
@antv_x6.js?v=d34f1e49:3873 Uncaught TypeError: elem.getBoundingClientRect is not a function
at Object.offset (@antv_x6.js?v=d34f1e49:3873:22)
at Proxy.getDropArea (index.js?v=d34f1e49:299:28)
at Proxy.isInsideValidArea (index.js?v=d34f1e49:281:28)
at Proxy.drop (index.js?v=d34f1e49:314:18)
at Proxy.onDragEnd (index.js?v=d34f1e49:208:30)
at HTMLDocument.method (@antv_x6.js?v=d34f1e49:11848:34)
at dispatch (@antv_x6.js?v=d34f1e49:3623:100)
at store.handler (@antv_x6.js?v=d34f1e49:3512:39)
解决方法:
在初始化dnd插件的时候,将dndContainer属性去掉就可以了。
估计是我dndContainer取值不对造成的。
欢迎关注公众号:清晰编程,获取更多精彩内容