A
A
Aleksandr2018-03-28 13:56:54
JavaScript
Aleksandr, 2018-03-28 13:56:54

Own modal for each entry?

There is a list of news
When you click, you need to open a popup with a full description of the news
How best to implement this?
Now I made a popup component, but I still can’t figure out how to pass the information of the selected record to it

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stepan Krapivin, 2018-03-28
@xevin

With slots . The vue site even has an example

A
Alexey Shashenkov, 2018-03-28
@teknik2008

Change data in the modal, depending on the entry
Via props

A
Alexander Aksentiev, 2018-03-28
@Sanasol

Through props or state.
If the full data needs to be requested from the server, then it’s natural to simply pass the ID and make a request to the server from the modal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question