antvis / g6-editor

532 stars 172 forks source link

demo中的BaseFlowEditor运行不起来 #96

Open zongz1024 opened 5 years ago

zongz1024 commented 5 years ago

运行就会报错 image 难道是因为我把引用改了吗??? image

PrincipleFirst commented 5 years ago

应该是这样

return new G6Editor.Itempannel({
      container,
    });

demo有误

zongz1024 commented 5 years ago

谢谢指点,但是它运行起来后又出现了这个问题,没有布局,整个页面是将所有的组件从上到下排列的 image

然后在调试窗口,报了一些警告 image image 所有的警告到都在这里,我就只是更改了一个地方 image

ArronYR commented 5 years ago

需要更改对应 PropType.function 为 PropType.func,如下

Detailpanel.propTypes = {
  createDetailpanel: PropTypes.func,
  editor: PropTypes.object,
  content: PropTypes.node,
};