VUE生成二维码插件
原文:https://www.jianshu.com/p/496fd1cbee8d
npm安装qrcodejs2 -保存
页面介绍
Dom结构
JS方法编写
出口
npm安装qrcodejs2 -保存
页面介绍
Dom结构
JS方法编写
出口
原文:https://www.jianshu.com/p/496fd1cbee8d
npm install qrcodejs2 --save
页面中引入
dom 结构
JS 方法编写
export default {
}
5)页面调用
// 注意: 在需要调用的地方 这样必须这样调用 否则会出现 appendChild null 就是id为qrcode的dom获取不到 返回结果为null
this.$nextTick (function () { this.qrcode(); })2、vue-qart
1) 安装 vue-qart
npm install vue-qart --save
页面中引入
data 中数据配置
export default {
data(){ downloadButton:false, config: { value: 'https://baidu.com', imagePath: '/static/logo/logo.png', filter: 'color' } }, components: { VueQArt } }dom 结构
3 实际项目中
3.1 引入文件
qrcodejs2---引入.jpg
3.2 生成二维码函数
生成二维码的函数.jpg
3.3 相应的位置调用函数
- 上一篇:潜台词快捷方式删除空行。
- 下一篇:qq好友是怎么克隆的?