S
S
Sergey2020-06-01 20:42:46
Vue.js
Sergey, 2020-06-01 20:42:46

How to cancel the click on the parent component when clicking on the child?

The handler of the parent component has the .native modifier, and the child component has the .stop modifier. When clicking on a child component, the handler of the parent component still fires, how can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-06-01
@0xD34F Vue.js

Try it @click="e => e.stopImmediatePropagation()"in a child component.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question