Tap event triggered 2 analysis in zepto on Chrome browser on desktop
1. Tap event triggered 2 times in Zepto, as shown in Figure 1
2. Output a message to the web console to determine the trigger 2 times, as shown in Figure 2
console.log(1);
3. View the output on the web console, 1 is output 2 times, as shown in Figure 3
4. The server interface is called in the subsequent process, and the interface is called twice at the same time, as shown in Figure 4
5. However, on the mobile device, it is actually only triggered once, and it can be verified through the time of the server interface, as shown in Figure 5
6. If you want to avoid triggering twice on the desktop device, you can enable the SingleTap event, as shown in Figure 6
TAP — triggered when the element is tapped.
SingleTap and DoubleTap — This pair of events can be used to detect clicks and double clicks on the element. (If you don’t need to detect clicks or double clicks, use TAP instead).
7. At this time, it will only be triggered once, as shown in Figure 7






