优化iframe内使用的优化

This commit is contained in:
iqudoo
2026-05-25 19:12:35 +08:00
parent c56c17589a
commit 6663fd6ab4
7 changed files with 103 additions and 110 deletions

2
dist/index.d.ts vendored
View File

@@ -8,7 +8,7 @@ interface ScanConfigOptions {
scanRestartDelay?: number,
/**
* iframe 场景下是否将 API 调用转发到父页面同名 SDKpostMessage
* - `'auto'`(默认):处于子 frame`parent !== window`)即转发,对外 API `startScan`)均由父页 SDK 执行
* - `'auto'`(默认):处于子 frame `startScan`由父页执行`onScanListener` 仅注册在 iframe 内,识别结果由父页 `postMessage` 回传
* - `true` / `'on'` / `'parent'`:存在父 window 时强制转发
* - `false` / `'off'` / `'local'`:始终在本页执行(子页自己要跑扫码时用)
*/

2
dist/index.js vendored

File diff suppressed because one or more lines are too long