码迷,mamicode.com
首页 > 其他好文 > 详细

vue+element打印页面功能

时间:2019-05-20 17:15:54      阅读:1098      评论:0      收藏:0      [点我收藏+]

标签:打印   cti   tps   lan   alt   inf   imp   vue   port   

项目中遇到了要打印页面的功能,我感觉我这个方法不太好,欢迎各位来改善指导

技术图片

技术图片

  使用print插件  https://github.com/xyl66/vuePlugs_printjs

       教程地址::https://blog.csdn.net/peiyongwei/article/details/82460709

  1. min.js中引入
  2. import Print from ‘@/plugs/print‘
  3. Vue.use(Print) // 注册

 

 1  <template>
 2 
 3  <section ref="print">
 4 
 5    <要打印内容/>
 6 
 7  <div class="no-print">不要打印我</div>
 8 
 9  </section>
10 
11  </template>
12 
13  this.$print(this.$refs.print) // 调用方法使用

vue+element打印页面功能

标签:打印   cti   tps   lan   alt   inf   imp   vue   port   

原文地址:https://www.cnblogs.com/jun-qi/p/10894942.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!