【发布时间】:2020-12-22 20:26:24
【问题描述】:
我想添加一个可拖动的 Rect(下面的屏幕截图中的红色)和孩子(下面的屏幕截图中的图标和文本)。每当我尝试这个时,我都会收到此错误:
TypeError: parentInstance.add is not a function
这是尝试添加文本的代码:
<Rect x={0} y={0} width={200} height={100} draggable fill="red">
<Text text="Pencil" />
</Rect>
【问题讨论】:
标签: react-konva