Answer the question
In order to leave comments, you need to log in
How to close an element when clicked outside its scope in VUEJS?
Hello, I made this modal window:
<template>
<div>
<div :class="{ 'is-active': isNextTab }">
<!-- Content -->
</div>
<button.v-on:click="nextTap()">SEND</button>
</div>
</template>
<script>
export default {
data () {
return {
isNextTab: false
}
},
methods: {
nextTap: function () {
if (this.isNextTab === false) {
this.isNextTab = true
} else {
this.isNextTab = false
}
}
}
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question