weapp-qrcode
weapp-qrcode copied to clipboard
windows,微信开发者工具,无法生成二维码,没有任何错误日志,回调函数也没有打印任何信息
qrcode = new QRCode('canvas', { text: "https://github.com/tomfriwel/weapp-qrcode", image: '/images/bg.jpg', padding: 12, width: qrcode_w, height: qrcode_w, colorDark: "#1CA4FC", colorLight: "white", correctLevel: QRCode.CorrectLevel.H, callback: (res) => { // 生成二维码的临时文件 console.log(res.path) } });
<canvas class='canvas' type="2d" style="width:{{qrcode_w}}px; height:{{qrcode_w}}px;" canvas-id='canvas' bindlongtap='save'></canvas>
我也是遇到这个问题了