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

[vue] 在vue事件中传入$event,使用e.target和e.currentTarget有什么区别? #471

Open
haizhilin2013 opened this issue Jun 22, 2019 · 4 comments
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] 在vue事件中传入$event,使用e.target和e.currentTarget有什么区别?

@haizhilin2013 haizhilin2013 added the vue vue label Jun 22, 2019
@daisybaicai
Copy link

事件发生时的元素,事件所绑定的元素

@logicool
Copy link

logicool commented Jul 1, 2019

currentTarget 始终是监听事件者,而 target 是事件的真正发出者

@girlfighting
Copy link

currentTarget:事件绑定的元素
target:鼠标触发的元素

@binnuo
Copy link

binnuo commented Jul 30, 2019

event.currentTarget指向事件所绑定的元素,而event.target始终指向事件发生时的元素。

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

No branches or pull requests

5 participants