Files
MrleeAdmin/frontend/app/uni_modules/Zeekin-ScanCode/readme.md
T

28 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 程序简介
> 由于自带的uni.scancode不支持连续扫码和实现定制化的界面,故设计本程序。
基于camera实现,细节满满的界面、动画和交互设计,简洁清晰的组件代码,已配置完善的权限校验交互。
- 默认支持连续扫码,通过自行改写自定义扫描事件可以实现单次扫码;
- 支持仅扫描条形码,将更改扫描框样式和扫描结果过滤;
- 支持扫码震动反馈、提示轻震反馈,支持闪光灯功能;
- 清晰、简洁、兼容良好的代码和界面,可基于现有逻辑快速二次开发。
### 组件参数说明
参数名 | 类型 | 必填 | 说明
------------- | -------------
isOnlyBarCode | Boolean | 否 | 配置是否仅扫码条形码模式,默认为false
scanResult | Function | 否 | 自定义扫码成功事件,默认为弹出结果提示框
### 使用示例(uni_module)
```html
<Zeekin-ScanCode :scanResult="handleScanResult" :isOnlyBarCode="true" />
```
```javascript
const handleScanResult = (data) => {
uni.showToast({
icon: 'none',
title: '自定义处理扫描结果:' + data
});
};
```