This example describes the micro-microbial bubbling event and its blocking method. Share to everyone for reference, specifically:
Category of event is divided into several:
- Click event : TAP : Longtap
- Touch event : TouchStart; Touchnd; TouchCancel; TouchMove
- Other : INPUT; Submit ….
- The first three categories are bubbling event , other, called
. Write a simple example, the code is not posted, the WXML file is as follows:Red
But it can also prevent the occurrence of the bubbling event, which is actually very simple, and bindtap
The effect is as shown in the figure: When I click When the innermost blue box, the printed results are as follows:The mechanism of the bubbling event is to print the click of blue, which is the innermost, The second layer and the third layer are then printed. Suppose you click on the yellow layer, you will print out yellow and red in turn. Click on red only to print red.
bindtap is changed to
Friendly Tips: Some tags are default in the top, such as Video, want to put a view on Video and set Catchtap to cover the VIDEO override. It is hoped that this article will help the WeChat applet development.