antv/x6 'component' of 'shapeMaps[node.shape]' as it is undefined.

925 阅读1分钟

antv/x6 注册自定义组件后,在使用时报错

Uncaught TypeError: Cannot destructure property 'component' of 'shapeMaps[node.shape]' as it is undefined.

查看@antv/x6-vue-shape版本:
  • 1.x版本时注册方式为:

    import "@antv/x6-vue-shape";

    Graph.registerNode("my-node", {...})

  • 2.x版本时 注册方式为:

    import { register } from "@antv/x6-vue-shape";

    register({shape: "my-node", ...})