监听识别
This commit is contained in:
7
types/index.d.ts
vendored
7
types/index.d.ts
vendored
@@ -274,6 +274,10 @@ interface ScanListenerInfo {
|
||||
* 监听级别
|
||||
*/
|
||||
level?: number;
|
||||
/**
|
||||
* 为 true 时仅接收同 key 主动扫码(startScan/scanImage 等)的结果,忽略扫码枪
|
||||
*/
|
||||
selfKeyOnly?: boolean;
|
||||
/**
|
||||
* 监听回调
|
||||
*/
|
||||
@@ -333,8 +337,9 @@ interface IScan {
|
||||
* @param key 监听key
|
||||
* @param match 监听匹配
|
||||
* @param level 监听级别
|
||||
* @param selfKeyOnly 为 true 时仅接收同 key 主动扫码结果,忽略扫码枪
|
||||
*/
|
||||
onScanListener(callback: ScanResultCallback, key: string, match?: string, level?: number): ScanListenerInfo;
|
||||
onScanListener(callback: ScanResultCallback, key: string, match?: string, level?: number, selfKeyOnly?: boolean): ScanListenerInfo;
|
||||
/**
|
||||
* 取消监听扫码结果
|
||||
* @param callback 监听回调,或监听key
|
||||
|
||||
Reference in New Issue
Block a user