更新记录
1.0.4(2025-05-15)
提高识别准确率
1.0.2(2025-05-09)
更新使用说明
1.0.1(2025-05-09)
更新文档
查看更多平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | 4.4 | 12 | √ |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
- | - | - | - | - | - | - | - | - | - | - |
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | 12 | √ | - |
u-scan
- u-scan 基于华为统一扫码插件ScanKit,兼容安卓/ios/鸿蒙(二维码、条形码),目前只支持单码模式。
重要说明
由于插件使用了第三方依赖,在插件市场导入后必须打包自定义基座后方可正常运行。
由于插件使用了第三方依赖,在插件市场导入后必须打包自定义基座后方可正常运行。
由于插件使用了第三方依赖,在插件市场导入后必须打包自定义基座后方可正常运行。
使用
<template>
<button type="primary" @click="handleScanCode">扫码</button>
{{ result }}
</template>
<script setup>
import { ref } from 'vue'
import {scanCode} from '@/uni_modules/u-scan';
const result = ref('')
const handleScanCode = () => {
scanCode({
success: (res) => {
result.value = res.result
console.log('res', res)
}
})
}
</script>