在网上寻找过解决办法 是 在v-dialog加入@opened="creatQRcode()"进行回调 但还是没有效果 请各位懂得小伙伴指点一下
、
creatQrCode() {
this.$nextTick(() => {
this.$refs.qrCodeUrl.innerHTML = ''
let text = `${this.text}?id=${this.info.id}&type=yh`
var qrcode = new QRCode(this.$refs.qrCodeUrl, {
text: text,
width: 100,
height: 100,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
})
})
},
this.$nextTick(() => {
this.$refs.qrCode.innerHTML = ''
const qrcode = new QRCode(this.$refs.qrCode, {
text: 'https://localhost:8080/miniprogram?agentId=' + val.agentId, // 需要转换为二维码的内容
width: 200,
height: 200,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H
})
会不会是 图片 没请求回来就就渲染了 。 而且报了 innerHtml未定义 。你看看 是不是使用了这个属性
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!