Skip to content
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

[Bug Report] checkbox的异步写法,会导致无法阻止事件冒泡 #7023

Closed
luanwulin opened this issue Aug 19, 2020 · 2 comments
Closed
Labels
Milestone

Comments

@luanwulin
Copy link

设备 / 浏览器
chrome

Vant 版本
2.10.2

Vue 版本
2.6.11

描述问题

checkbox源码中,settimeout再去emit事件的方式,会导致外面的事件捕捉,无法调用event.stopPropagation

@chenjiahan
Copy link
Member

嗯,这个问题暂时没法在组件内部处理,涉及一些不兼容更新,可以先用 click.native.catch 来捕获

<van-checkbox @click.native.catch />

@chenjiahan
Copy link
Member

已在 3.0.0-beta.3 版本修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants