Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question