1
1
100R2019-09-15 00:52:52
Vue.js
100R, 2019-09-15 00:52:52

How to pass a form and a button handler to a modal window?

I have:

1. A component with a "Buy" button.
2. A component with an order form.
3. Component with the "Request a call" button.
4. A component with a form for ordering a callback.
5. Modal window component.

Depending on which button was clicked ("Buy" or "Request a call"), we show the required form, pass it to the modal window and open it. There are two buttons "Submit" and "Close" in the model window. That is, we either submit the form or close the window. At the same time, it is desirable to make the components as independent from each other as possible. What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor L, 2019-09-15
@Fzero0

Eh well on a discount

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question