我试图在react-beautiful-dnd中构建一个可拖操作的简单实现,但显然我的可拖操作不会移动。
下面是我在CodeSandbox中的示例代码:
发布于 2020-04-02 16:18:02
只需将style属性从draggable的子元素中删除(在您的示例中,它是Block组件)。DnD使用它自己的style属性,然后重写它。您必须使用className来代替它。
没有style的例子
https://codesandbox.io/s/using-react-beautiful-dnd-with-hooks-1m4zm
https://stackoverflow.com/questions/60996040
复制相似问题