1.安装html2canvas,qrcodejs2
npm install qrcodejs2 -save
npm install --save html2canvas
2.所需页面引入
import QRCode from 'qrcodejs2'
import html2canvas from "html2canvas"
3.二维码显示位置
<div ref="pay_OR_code" id="pay_OR_code">
<p class="pay_order_title">【数学】xxxxxxxxxx</p>
<div class="money">¥<span class="num">128</span><span > / 3次学习</span></div>
<div class="pay_code">
<div class="item-pic" id="qrinvitecode"></div>
</div>
<p class="order_number">支付订单号:<span>xxxxxxxxxxxxxxxx</span></p>
<p class="order_type">请使用<span>{
{payType}}</span>扫描二维码完成支付</p>
<p