My vue component like this :
<template>
...
<b-modal ref="modal" id="modalInvoice" size="lg" title="Invoice">
<Invoice/>
<div slot="modal-footer" class="w-100">
<b-btn size="sm" class="float-right" variant="warning" @click="show=false">
<i class="fa fa-print"></i> Print
</b-btn>
</div>
</b-modal>
...
<b-btn variant="warning" class="btn-square mt-2" v-b-modal.modalInvoice @click="checkout()"><i class="fa fa-credit-card-alt"></i>Checkout</b-btn>
...
</template>
<script>
...
export default {
...
mounted() {
$(this.$refs.modal).on('hidden.bs.modal', () => {
console.log('close modal')
})
},
}
</script>
I try like that. So I try using ref="modal" and mounted. But it does not works. If modal close, the console.log is not show
How can I solve this problem?