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

The switch component click event cannot use the .stop modifier to prevent the click event from bubbling #4010

Open
1 task
RicardoWL opened this issue Apr 28, 2021 · 1 comment

Comments

@RicardoWL
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.3

Environment

vue3.0.11

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击switch组件

What is expected?

不触发点击事件冒泡

What is actually happening?

使用.stop后保存e.stopPropagation is not a function

@github-actions github-actions bot changed the title switch组件click事件无法使用.stop修饰符,无法阻止点击事件冒泡 The switch component click event cannot use the .stop modifier to prevent the click event from bubbling Apr 28, 2021
@ajuner
Copy link
Member

ajuner commented Apr 28, 2021

可以自己写在click方法里面调用这个e.stopPropagation()吧,因为回调的第一个参数不是Event

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

No branches or pull requests

2 participants