Answer the question
In order to leave comments, you need to log in
How to intercept the error of child components from the parent component?
Hello, an unknown error is coming in child components. How can it be intercepted in the parent to block the window from showing the banner? Moreover, it can come on any action, creating, deleting a download. It is displayed in the console, I don’t want to check for a similar error in every action, since it is the same for all child components.
Answer the question
In order to leave comments, you need to log in
call $emit function inside child component
methods: {
example () {
this.$emit('example', {
test: this.testParams,
})
}
}
<сhildComponent @example='onExample' />
methods: {
onExample (data) {
console.log('child component said', data)
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question