Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当将卡片从一列拖到另一列时,isDragging 属性始终为 false。为什么?这个例子有什么问题?
示例:https ://react-wdpn5f.stackblitz.io
代码:https ://stackblitz.com/edit/react-wdpn5f
实际上,对于您拖动的卡,它设置为 true .. 只要放
console.log("isDragging" + isDragging);
前
const opacity = isDragging ? 0 : 1
然后你可以在控制台看到isDragging设置为true..对于其他卡,它仍然是false..