Skip to content

Commit

Permalink
docs(README): add notes about 1D barcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant authored and gruhn committed Dec 25, 2023
1 parent 000776c commit 9278e21
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ You can import the components independantly
import { QrcodeStream, QrcodeDropZone, QrcodeCapture } from 'vue-qrcode-reader'

const MyComponent = {

//
components: {
QrcodeStream,
QrcodeDropZone,
QrcodeCapture
},
}

// ...
))
}
```

or register all of them globally right away
Expand Down Expand Up @@ -165,6 +165,11 @@ Use kebab-case to reference them in your templates:
- Make sure, there is some white border around the QR code.
- Test your QR codes in the upstream packages: [`barcode-detector`](https://github.com/Sec-ant/barcode-detector) -> [`zxing-wasm`](https://github.com/Sec-ant/zxing-wasm) -> [`zxing-cpp`](https://github.com/zxing-cpp/zxing-cpp), and file detection issues in the highest-level repository where the problem first occurs.

#### 1D barcodes are not being detected.

The default value for the `formats` prop is `"['qr_code']"`, which reflects the setting before the `formats` prop was available.
You'll need to add [other barcode formats](https://github.com/Sec-ant/barcode-detector?tab=readme-ov-file#barcode-detector) to this prop to detect those types of barcodes. Check out [this demo](https://vue-qrcode-reader.netlify.app/demos/CustomTrackingWithFormats.html).

#### How to make it work with Vue 2?

Support is dropped but you can downgrade to vue-qrcode-reader v3.\* or lower.
Expand Down

0 comments on commit 9278e21

Please sign in to comment.