R
R
Ruslan Absalyamov2018-11-28 10:25:07
Vue.js
Ruslan Absalyamov, 2018-11-28 10:25:07

How to make a modal window spin outside of a button?

I have a question, according to the button, everything is clear that @click and the event are triggered, but how to close it when outside the modal window, I don’t understand where to put the event and how do I understand this event should be supposedly @click="$emit('close')"in the modal window?
Here is my example of a modal window https://codesandbox.io/s/pyvjxxnnvj
Located in src/components/ModalComponent.vue
But it is similarly made like this one https://jsfiddle.net/yyx990803/mwLbw11k/?utm_sourc...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Tokarev, 2018-11-28
@rusline18

Usually this is done by clicking on the overlay, in your example this is<div class="modal-mask">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question