4.3-antv/g6-editor

4.3-antv/g6-editor_第1张图片
image.png

g6-editor: https://github.com/antvis/g6-editor
gg-editor: https://github.com/gaoli/GGEditor

import Editor from '@antv/g6-editor'
const editor = new Editor();
editor.add(component);
editor.getCurrentPage(); // 获取当前页
editor.on('beforecom m andexecute', ev=>{}); // 执行命令前 editor.on('aftercom m andexecute', ev=>{}); // 执行命令后
editor.destroy(); //销毁编辑器
  const graph = page.getGraph();
  const group = graph.getRootGroup();

node数据层次

   const { model_data = {}, nodeError, errorMsg, connectAnchor } = model;
   const { name, inputs = [], options = [], outputs = [] } = model_data;
   // 手动刷新
      page.update(item.target, {
        __modify_count: (item.target.model.__modify_count || 0) + 1,
      });

你可能感兴趣的:(4.3-antv/g6-editor)