一、使用vue-qr 生成二维码
1.下载 vue-qr
npm install vue-qr --save
2.引入
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
3.页面使用
text 就是二维码传递的数据
我是单独封装的组件
<vueQr
ref="qrcode"
:logoScale="0.3"
:text="text"
correntLevel="0"
:size="200"
magin="auto"
colorDark="black"
colorLight="white"
></vueQr>
二、前端局部打印页面
1.html
//因为不想在页面中展示这个盒子,所以设置了 display: none
<div style="display: none">
<!--startprint-->
// 中间这一块是 要局部打印的内容 我是需要打印的一个循环数组
<div v-for="item in qsCodeList" :key="item.id" style=&