vue-qrcode-reader icon indicating copy to clipboard operation
vue-qrcode-reader copied to clipboard

PaintOutline vue 3 in quasar project

Open abmcr opened this issue 2 years ago • 2 comments

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

abmcr avatar Oct 23 '21 15:10 abmcr

Can you console.log(decodedCodes) and show the output?

gruhn avatar Oct 24 '21 18:10 gruhn

Schermata 2021-10-25 alle 09 45 29

abmcr avatar Oct 25 '21 07:10 abmcr

This issue has been marked as stale. If there is no further activity it will be closed.

github-actions[bot] avatar Jul 18 '23 00:07 github-actions[bot]