My vue component like this :
<template>
...
<b-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 {
...
methods: {
print() {
window.print()
}
}
}
</script>
If I click print button, it works. But it displays the entire website. I just want if I click the print button, it only shows the contents of the modal
How can I do it?