Closed abmcr closed 1 year ago
I have this code in template
<qrcode-stream style='height:100%' :track="paintOutline" @decode="onDecode" @init="onInit" />
and this is the function
paintOutline (detectedCodes, ctx) { for (const detectedCode of detectedCodes) { const [ firstPoint, ...otherPoints ] = detectedCode.cornerPoints ctx.strokeStyle = "red"; ctx.beginPath(); ctx.moveTo(firstPoint.x, firstPoint.y); for (const { x, y } of otherPoints) { ctx.lineTo(x, y); } ctx.lineTo(firstPoint.x, firstPoint.y); ctx.closePath(); ctx.stroke(); } }
The qrcode is decoded but the paintOutline don't work
Uncaught TypeError: detectedCodes is not iterable at Proxy.paintOutline (Index.vue?8b24:34) at eval (VueQrcodeReader.umd.min.js?5282:1)
Quasar version 2.1.9 and vue 3
Can you console.log(decodedCodes) and show the output?
console.log(decodedCodes)
This issue has been marked as stale. If there is no further activity it will be closed.
I have this code in template
<qrcode-stream style='height:100%' :track="paintOutline" @decode="onDecode" @init="onInit" />
and this is the function
paintOutline (detectedCodes, ctx) { for (const detectedCode of detectedCodes) { const [ firstPoint, ...otherPoints ] = detectedCode.cornerPoints ctx.strokeStyle = "red"; ctx.beginPath(); ctx.moveTo(firstPoint.x, firstPoint.y); for (const { x, y } of otherPoints) { ctx.lineTo(x, y); } ctx.lineTo(firstPoint.x, firstPoint.y); ctx.closePath(); ctx.stroke(); } }
The qrcode is decoded but the paintOutline don't work
Uncaught TypeError: detectedCodes is not iterable at Proxy.paintOutline (Index.vue?8b24:34) at eval (VueQrcodeReader.umd.min.js?5282:1)
Quasar version 2.1.9 and vue 3