更新记录
1.0.0(2025-05-28)
下载此版本
华为扫码
this.camera = uni.createCameraContext()
this.cameraContextCameraFrameListener = this.camera?.onCameraFrame((frame: CameraContextOnCameraFrame) => {
cameraScan(frame.data as ArrayBuffer, frame.width as number, frame.height as number, (code: UTSJSONObject) => {配合camera组件
uni.showToast({
title: 'ok'
})
console.log(code['code'])
})
})
setTimeout(() => {
this.cameraContextCameraFrameListener?.start({
complete(e) {
console.log(e)
}
})
}, 500)
},
methods: {
aa() {
scanCode((code: string) => {
唤起内置扫码
console.log(code)
})
}
},
平台兼容性
uni-app
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
- |
- |
- |
- |
4.4 |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
5.0 |
- |
- |
- |
l-scan
开发文档
UTS 语法
UTS API插件
UTS uni-app兼容模式组件
UTS 标准模式组件
Hello UTS