G
G
grabbee2020-10-30 05:58:41
Vue.js
grabbee, 2020-10-30 05:58:41

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

1 answer(s)
A
Alexander, 2020-10-30
@Seasle

If I understand correctly, is this necessary?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question