parent element binds a click event through the on ("click")
method, and the child element binds a click event through v-on
.
when the parent element is clicked, the handler of the parent element"s click event is triggered. The click event of the parent element is removed in handler through the off ()
method, when the child element is clicked, a bubble occurs and the handler of the parent element is executed.
Why?