Comments (4)
其实需求是没有成功放置的回调
放置成功后的逻辑在useDrop中drop回调内,
如果是没有成功放置(拖到到其他非目标区域松开鼠标)有办法执行回调么
from vue3-dnd.
其实需求是没有成功放置的回调 放置成功后的逻辑在useDrop中drop回调内, 如果是没有成功放置(拖到到其他非目标区域松开鼠标)有办法执行回调么
可以使用useDrag
的end
事件,通过monitor.didDrop()
来判断拖拽是否被处理
from vue3-dnd.
查了一下, isOver的问题react-dnd也存在, 而且暂时还没有修复
react-dnd/react-dnd#3489
from vue3-dnd.
其实需求是没有成功放置的回调 放置成功后的逻辑在useDrop中drop回调内, 如果是没有成功放置(拖到到其他非目标区域松开鼠标)有办法执行回调么
可以使用
useDrag
的end
事件,通过monitor.didDrop()
来判断拖拽是否被处理
我试试, 蟹蟹大佬回复
from vue3-dnd.
Related Issues (20)
- 拖拽会执行多次onUpdated HOT 1
- 缩放功能 HOT 1
- 树形嵌套组件来回拖拽排序这个怎么做? HOT 2
- Can't be drag after dragged two times HOT 3
- 使用vue-tsc && vite build编译之后,页面console报错 HOT 2
- 原react-dnd中useDrop有canDrop方法控制是否可以放置,希望可以增加这个方法。感谢 HOT 4
- how to use with elment plus <el-tree> HOT 1
- vue3-dnd-test-utils, peerDependency "@testing-library/vue": ">= 11" is unknown HOT 4
- 拖动时的预览图能否设置样式 HOT 5
- Plans to support iOS? HOT 12
- Invariant Violation: Expected drag drop context HOT 7
- 关于vue3的toRefs HOT 2
- transition animation HOT 2
- 使用官方demo报错 HOT 6
- 支持单击或双击放置目标吗? HOT 3
- 想实现基于鼠标按下后,移动了指定的x,y距离后再进行拖拽,这个在useDrag的canDrag里获取不到实时的鼠标信息,如何实现这种效果? HOT 2
- useDrag 无法配置beginDrag参数 HOT 4
- 想知道如何写楼层装修,例子里面没有找到,试了很久也不行。 HOT 4
- Cannot read properties of undefined (reading 'NODE_ENV') HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue3-dnd.