Answer the question
In order to leave comments, you need to log in
How to cancel render in vue&?
I make a kind of tabs, from a child element, I call the parent method, which **does not matter much** while I need the child itself to not form html. Can't figure out how to do it better?
mounted: function () {
let tab = {
title: this.title,
content: this.$el.innerHTML
};
this.$parent.addTab(tab);
},
<slot></slot>
more elegant (more correct) than this.$el.innerHTML
- in general, I will say thanks
Answer the question
In order to leave comments, you need to log in
why not insert the component into the parent instead of this perverted html copy?
It's not very clear what you want to do. Do you want to extract html from a child component, and so that the component does not draw this html? It seems to me that this is not possible. And I don't think that's right.
Maybe then you don't need to use this child component, but just draw this html in the parent?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question