1 、安装
npm install @xkeshi/vue-qrcode
2、 在组件中引用
import Qrcode from '@xkeshi/vue-qrcode';
3、在组件中注册
components:{
qrcode: Qrcode
},
4、在data中定义一个属性
image.png
5、以业务编码为例
image.png
6、在模板内使用
image.png
npm install @xkeshi/vue-qrcode
import Qrcode from '@xkeshi/vue-qrcode';
components:{
qrcode: Qrcode
},