我正在尝试使用相机实现条形码阅读器相机屏幕弹出,但不解码条形码

问题描述

[我正在尝试使用 Vue js 实现条形码阅读器。用于扫描条码的摄像头按预期弹出,但无法解码条码。]

[这里我想使用 onDecode() 方法使用变量结果来控制解码后的值,因为函数没有执行 ]

通过 npm install 安装 vue-barcode-reader --save

<template>

<StreamBarcodeReader @decode="onDecode"/>
</template>

<script >
import { StreamBarcodeReader } from "vue-barcode-reader";

export default ({
    components : { StreamBarcodeReader },data(){ },methods: {
        onDecode(result) {
             console.log(result);
        },}
})
</script>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)