Define BarcodeScanner Hook

This commit is contained in:
Claudio Ortolina
2025-02-13 14:45:56 +00:00
parent 39de4149fa
commit db5fec1a3b
2 changed files with 12 additions and 4 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
import { BarcodeDetector } from "barcode-detector/ponyfill";
const run = async function () {
const barcodeTest = async function () {
// check supported formats
const supportedFormats = await BarcodeDetector.getSupportedFormats();
console.log(supportedFormats);
@@ -17,4 +17,8 @@ const run = async function () {
barcodeDetector.detect(imageFile).then(console.log);
}
run();
export default {
mounted() {
console.log(this.el);
}
}