A
A
Andrej Sharapov2019-07-29 12:20:51
Vue.js
Andrej Sharapov, 2019-07-29 12:20:51

How to rebuild component template?

Good afternoon!
Can you please tell me how to configure the component template to display specific content for each page?
Here is an example:

It works fine.
Here in the component I have two lists (1 for one page, 2 for another and so on...). I would not like to create new components for each page, but pull them out of one, simply changing the name of the parent block1 , block2 , etc. In theory, there are no other values ​​planned in the template.
Tell me the execution logic. I think that it can be done through, but so far I have no idea how. I feel that there is a simpler solution, but so far it does not reach))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Suha, 2019-07-29
@Madeas

If you use the same component for lists, then depending on the page, change the props, not the components.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question