Closed poerlang closed 2 years ago
Latest commit: 2f8233182cd36eac1af23384cbceb40e9cafca8e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
vue3-dnd | ✅ Ready (Inspect) | Visit Preview | Aug 16, 2022 at 4:10AM (UTC) |
@poerlang 关于这个注意的内容以及示例代码,放到常见问题模块会好一些吧,并且在hover中赋值也不是必要的,更多的是他需要知道在hover中能做这个事情,如果在hover外部需要offset等信息,应该是通过collect暴露属性
了解了解
如果需要获取鼠标的 实时轨迹 (实时的Offset),应该关注一下 DropTargetMonitor 而不是 DragSourceMonitor, 比如,你可以在 useDrop 的回调 hover: (item, monitor) => {...} 的参数中获取 DropTargetMonitor:
<--范例代码-->