vue-easy-print

调整UI

找了半天,在打印的那个vue文件中添加 style scoped 加入
去掉页眉页脚, 正常 print() 浏览器会带页眉和页脚,包含日期、页码、页面title、当前url,这些信息往往不适合打印出来,所以需要去掉。
所在位置:vue-print\src\components\demo.vue

<style scoped>

@page{
  size: auto A4 landscape;
  margin: 3mm;
}
</style>

案例效果:
git clone https://github.com/huangbosbos/vue-print.git

参考:
https://blog.csdn.net/siwangdexie_copy/article/details/86303435

Logo

前往低代码交流专区

更多推荐