vue blocking About bubbling events

The parent element to prevent bubbling events to all sub-elements, only the @ click = "function ()" written @ click.self = "function ()" can be in the parent element.

Single child element not want to be the father of event delivery, you need to @ click = "function2 ()" written @ click.stop = "function2 ()" can be in child elements. If the child element does not bind any event, I do not know, I can only think of what is not a random event bindings do, then add .stop. If there are more direct good way to inform friends please leave a message, grateful.

Published 20 original articles · won praise 8 · views 50000 +

Guess you like

Origin blog.csdn.net/a26637896/article/details/79287645