Closed AleksandarMiha closed 4 years ago
@warlock jofftiquez
@jofftiquez
@igemnace
Use v-if
set the default value to false. Then make it true when the print method is called.
@jofftiquez
it is no work
Check my question
https://stackoverflow.com/questions/61126059/how-to-hide-element-in-vue-html-to-paper/61126377?noredirect=1#comment108142285_61126377
@jofftiquez @igemnace @warlock @enometsys @
Hello @AleksandarMiha we appreciate you for using our plugin, however, the problem you're encountering is not part of the solution that this plugin is offering. Can you maybe create a reproduction via codepen or jsfiddle? Thanks.
@AleksandarMiha do this:
print () {
this.showInPrint = true; // show the <p> tag
// Use nextTick to trigger the print on next update
this.$nextTick(() => {
vm.$htmlToPaper('printMe', null, () => {
console.warn('done');
this.showInPrint = false; // hide the <p> tag when printing is done
});
});
},
Yes friend. Solution is this.$nextTick. Thanks :)
Hmm but i have another problem. When i goes to print function. If go to cancel I lose my element in html. I need go to refresh page to see again p tag. Solution?
@jofftiquez @warlock @enometsys @igemnace
Hello i want to show any element which is hidden in html. Example
Thanks.