Weex custom component for barcode scanner, based on ZXing Android Embedded
Render a qrcode scanning view.
<scanner class="scanner" @decoded="handleResult"></scanner>
-
add listener on
decoded
event, to get the decoded valuemethods: { handleResult(e) { this.decodeResult = e.value; }, }
-
decoded
When the qrcode is recognized, it will fire the
decoded
event.{ value: 'decoded text' }