Skip to content
Advertisement

How can I use window print in modal vue?

My vue component like this :

JavaScript

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?

Advertisement

Answer

One way to doing this is by creating a clone of the modal and using css to limit visibility of what’s printed:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement