生成二维码,扫码跳转网址
import QRCode from 'qrcode'
// <canvas ref="myCanvas" style="width: 160px; height: 160px;"/>
this.$nextTick(() => {
// jumpUrl为跳转的网址,myCanvas是canvas元素的ref,默认宽高默认好像140px
QRCode.toCanvas(this.$refs.myCanvas, jumpUrl)
})
标签:扫码,myCanvas,jumpUrl,网址,二维码,跳转
From: https://www.cnblogs.com/jia-zq/p/16742884.html