多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
1.将weapp_qrcode.js文件导入到/include/js/目录下 2.在js文件中载入组件 ~~~ let Qrcode = require('../../../include/js/weapp_qrcode'); ~~~ 3.在wxml模板页中输入容器 ~~~ <canvas class="test" canvas-id="myQrcode"></canvas> ~~~ 4.在启用处调用 ~~~ let opt = {}; opt.width = 220; opt.height = 220; opt.canvasId = 'myQrcode'; opt.text = '二维码内容'; Qrcode(opt); ~~~