A
A
Alexey2019-07-30 14:32:54
Vue.js
Alexey, 2019-07-30 14:32:54

How to create a popup with dynamic content?

Started learning Vue.js. Using Vue Cli, I would like to clarify this point for myself:
Let's say we have a page with 10 buttons that open a popup. Outwardly, the popups are the same, only the content is different. The content can be absolutely anything - forms, pictures, etc.
I created a popup component with only the template itself, no content, and created 10 components with popup content. Each of the 10 buttons should open a popup with the appropriate content.
I can't figure out how to display in the popup exactly the component that corresponds to the pressed button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-07-30
@AleksRap

is
slots

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question