Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

No working onDetected event #23

Open
loveunCG opened this issue Jul 16, 2019 · 1 comment
Open

No working onDetected event #23

loveunCG opened this issue Jul 16, 2019 · 1 comment

Comments

@loveunCG
Copy link

I have used different device like iphone7, Samsung gx8 etc..
But always not working onDetected event.
Im only use example code

<template>
  <div>
    <h1>Barcode Reader</h1>
    <v-quagga :onDetected="logIt"
              :readerSize="readerSize"
              :readerType="readerTypes"
              :aspectRatio="aspectRatio"></v-quagga>
  </div>
</template>

<script>
export default {
  name: 'VueBarcodeTest',

  data () {
    return {
      readerSize: {
        width: 640,
        height: 480
      },
      readerTypes: [
        'code_128_reader',
        'ean_reader',
        'ean_8_reader',
        'code_39_reader',
        'code_39_vin_reader',
        'codabar_reader',
        'upc_reader',
        'upc_e_reader',
        'i2of5_reader',
        '2of5_reader',
      ],
      aspectRatio: { min: 1, max: 2 },
      detecteds: []
    }
  },
  methods: {
    logIt (data) {
      console.log('detected', data)
      alert(JSON.stringify(data))
    }
  }
}
</script>
@kevinstory
Copy link

You need to change your code from
:readerType="readerTypes"
to
:readerTypes="readerTypes"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants