
本文共 2097 字,大约阅读时间需要 6 分钟。
���������������������������������������
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������QRCode.js���qrcode.js2������������������������Vue.js������������������������������������������������
������npm������QRCode.js2���
npm install --save qrcodejs2
������������������������������������������������������������������������Vue.js���������������������
import QRCode from 'qrcodejs2';export default { methods: { generateQRCode() { const qrcode = new QRCode('qrcode', { width: 400, // ��������������� height: 400, // ��������������� text: 'www.zhizuobiao.com', // ��������������� colorLight: '#ffffff' // ��������������� }); } }, mounted() { this.generateQRCode(); }};
������jquery���������������������������������������������������������������������������
���������������������jquery������������
������jquery���������������������������������������������������������
$(() => { $('#qrcode').qrcode({ text: 'www.zhizuobiao.com', width: 300, height: 300, });});
������������������������������������������������������������������������������������������������
render
���������������������������������������������"canvas"
���width
���height
������������������������������typeNumber
���������������������������������������������-1
���correctLevel
���������������������������������QRErrorCorrectLevel.H
���
������������
������������������������������������������������������������������������������������������������������������160������������������������������������������������������������������UTF-8������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
