Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the distinction between @ click and @ tap overlapping events in vue

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people don't quite understand the knowledge points of this article "what is the distinguishing method of vue's @ click and @ tap overlapping events", so the editor summarizes the following, with detailed content and clear steps, which can be used for reference. I hope you can gain something after reading this article. Let's take a look at this article "what is the distinguishing method of vue's @ click and @ tap overlapping events".

@ click @ tap overlapping event differentiation

Clicking on the remove event triggers the details event, using @ click.stop

Official introduction

Edit Delete Edit Delete the difference between click and tap events click event

The click event is a stand-alone event on the PC side, but when this event is implemented on the mobile side, there will be a delay in 300ms, so the mobile side generally uses tap instead of click.

Tap event

Tap can reduce the delay of click on the mobile side and improve the performance.

Penetrating problem

On the same z-axis, there are two different elements of z-index. The element above is bound to the tap event, and below is an a tag. Once tap is triggered, this element will display: none. From the tap above, we can see that there are touchstart and touchend, so the click event is triggered after 300ms, and the z-index has disappeared, so the click event of the following an is triggered. Note: we think that the a tag is bound to the click event by default. And this phenomenon is not what we expected.

Using fastclick to solve the problem of insensitive focus of mobile input box

On the mobile side, the input box may not be able to enter after clicking, and you need to press for a long time or click continuously to get the focus of the input box. Fastclick can be used to solve this problem.

The above is the content of this article on "how to distinguish between @ click and @ tap overlapping events in vue". I believe you all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to learn more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report