Answer the question
In order to leave comments, you need to log in
How to pass different components to another in VUE?
There is a API of the same type, it gives resources in lists. Only the lists themselves differ. And so I tried to make a common component that loads a list according to filters by name and can be paginated and a lot of things. But he does not know the format of the data that he uploaded.
You can pass a template inside it as a slot to draw a specific list. But it turns out that it is difficult to remove an element, for example. After all, the list itself is loaded in the parent. And the delete button will be in the imported list item template. And you can't put an event on a slot.
How to get out of the impasse? refs...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question