-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graph监听鼠标双击会多次触发单击事件 #3558
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. |
timeOut |
例子链接:https://codesandbox.io/s/dawn-sky-vnj525 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
node:dbclick会多次触发node:click
定时器只能解决多次的问题
有没有人知道双击触发单击事件怎么解决
重现链接
https://stackblitz.com/edit/vue-ccyk8n?file=src%2FApp.vue
重现步骤
graph.value.on("cell:dblclick", ({ cell }) => {
clearTimeout(timeOut)
console.log(’这里是双击事件‘)
});
graph.value.on('cell:click', ({ cell }) => {
clearTimeout(timeOut)
timeOut = setTimeout(()=>{
console.log(’这里是单击事件‘)
},200)
})
预期行为
双击不要触发单击事件
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: