[Vuejs]-JavaScript : this.$emit('closeRequest') is not create any event in vue dev tool

0๐Ÿ‘

    <template>
<div>
<nav class="panel column is-offset-2 is-8">
    <p class="panel-heading">
        VueJs Phonebook
        <button class="button is-link is-outlined" @click="openAdd">
            Add New
        </button>
    </p>

</nav>

<Add :openmodal='addActive' @closeRequest='closeAdd'></Add>

</div>
</template>

<script>
let Add = require('./Add.vue')
export default {
    components:{Add},
    data(){
        return{
            addActive:''
        }
    },

    methods:{
        openAdd(){
            this.addActive = 'is-active';
        },
        closeAdd(){
            this.addActive = '';
        }
    }
}
</script>

Leave a comment