Home > front end >  Vue printed pages
Vue printed pages

Time:09-27

I use the NPM install vue - print - nb - save, and then import the print from 'vue - print - nb'; Vue. Use (Print);//paging does can be used after registered, but no matter how long the div inside things, only have one page content, scaling can be used to solve the problem, but only Google can support scaling of the function, other browsers do not support, I then use the print, js to solve this problem, can be paged, but the style is missing, any solution for everyone if you can solve the NPM install vue - print - nb - can't save the paging, best used in the project and to print is a little trouble, thanks for worship first

CodePudding user response:

this is NPM install vue - print - nb - not paging, after the save,,
this is print style had been lost

CodePudding user response:

Vue - print - nb this paging need to use
 & lt; Div style="page break - before: always."> 
Settings to print the entire dom display: inline - block;

CodePudding user response:

Use the Print. Js

 const style='@ page {margin: 0} @ media print {}'//custom style 
PrintJS ({
Printable: 'printContent//to print the contents of the id
Type: 'HTML',
Style: style,
ScanStyles: false
})

CodePudding user response:

Your CSS styles do not use less and sass styling will exist
  • Related