vue3怎么能像vue2的$on一样,实现全局拦截点击事件呢? #12909
elarbor
started this conversation in
General Discussions
Replies: 3 comments 17 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
都改原型链了直接把 |
Beta Was this translation helpful? Give feedback.
16 replies
-
你们能拿到原始事件回调的返回值吗 你这 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
之前vue2项目很好实现,可是vue3 原型链上没有
$on
了,通过原生的document.addEventListener('click', fn);
点击事件也能监听到但拦截不到。我想像https://blog.csdn.net/qq_42618566/article/details/124670043 一样拦截并且重构点击事件逻辑
Beta Was this translation helpful? Give feedback.
All reactions