SDK开发完成

This commit is contained in:
iqudoo
2026-04-30 16:36:31 +08:00
parent 21ae621c6e
commit 0acd16e0a5
9 changed files with 189 additions and 53 deletions

20
types/index.d.ts vendored
View File

@@ -3,17 +3,25 @@
*/
interface ScanConfigOptions {
/**
* 网页扫码canvas样式
* 网页扫码canvas是否启用,默认启用
*/
webCanvasStyle?: string,
webCanvasEnabled?: boolean,
/**
* 网页扫码canvas样式默认position: fixed; width: 300px; height: 300px; top: 0; left: 0; z-index: 9999;
*/
webScanCanvasStyle?: string,
/**
* 网页扫码类型,默认支持二维码和条码
*/
webScanType?: ('qrCode' | 'barCode')[],
/**
* 网页扫码canvas是否启用默认启用
* 网页扫码视频是否镜像,默认自动判断:前置/PC镜像后置不镜像
*/
webCanvasEnabled?: boolean,
webScanVideoMirror?: boolean,
/**
* 网页扫码视频是否垂直镜像,默认不镜像
*/
webScanVideoMirrorVertical?: boolean,
/**
* 网页扫码成功提示音地址,默认使用内置提示音
*/
@@ -153,6 +161,10 @@ interface IScan {
* 开启扫码
*/
startScan(): void;
/**
* 开启视频扫码
*/
scanVideo(): void;
/**
* 选择图片进行识别
*/