qsh-webview-sdk 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +29 -0
- package/dist/qsh-webview-sdk.es.js +1750 -1598
- package/dist/qsh-webview-sdk.es.js.map +1 -1
- package/dist/qsh-webview-sdk.umd.js +3 -3
- package/dist/qsh-webview-sdk.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,27 @@ declare namespace UniWebView {
|
|
|
27
27
|
data?: any;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
interface MiniProgramNavigateResult {
|
|
31
|
+
/** errMsg */
|
|
32
|
+
errMsg?: string;
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface MiniProgramNavigateOptions {
|
|
37
|
+
/** target mini program id */
|
|
38
|
+
appid: string;
|
|
39
|
+
/** target mini program page path */
|
|
40
|
+
path?: string;
|
|
41
|
+
/** target mini program env */
|
|
42
|
+
env?: "release" | "trial" | "develop";
|
|
43
|
+
/** success callback */
|
|
44
|
+
success?: (res: MiniProgramNavigateResult) => void;
|
|
45
|
+
/** fail callback */
|
|
46
|
+
fail?: (error: any) => void;
|
|
47
|
+
/** complete callback */
|
|
48
|
+
complete?: () => void;
|
|
49
|
+
}
|
|
50
|
+
|
|
30
51
|
/**
|
|
31
52
|
* 环境信息
|
|
32
53
|
*/
|
|
@@ -397,6 +418,7 @@ declare namespace UniWebView {
|
|
|
397
418
|
switchTab(options: NavigateOptions): void;
|
|
398
419
|
reLaunch(options: NavigateOptions): void;
|
|
399
420
|
redirectTo(options: NavigateOptions): void;
|
|
421
|
+
navigateToMiniProgram(options: MiniProgramNavigateOptions): void;
|
|
400
422
|
postMessage(options?: PostMessageOptions): void;
|
|
401
423
|
getEnv(callback: (info: EnvironmentInfo) => void): void;
|
|
402
424
|
chooseImage(options?: ChooseImageOptions): void;
|
|
@@ -415,6 +437,13 @@ declare namespace UniWebView {
|
|
|
415
437
|
/** WebView 对象(兼容旧版本) */
|
|
416
438
|
webView: WebView | null;
|
|
417
439
|
|
|
440
|
+
navigateToMiniProgram(
|
|
441
|
+
options: MiniProgramNavigateOptions,
|
|
442
|
+
): Promise<MiniProgramNavigateResult> | void;
|
|
443
|
+
navigateToMiniProgramAsync(
|
|
444
|
+
options: Omit<MiniProgramNavigateOptions, "success" | "fail" | "complete">,
|
|
445
|
+
): Promise<MiniProgramNavigateResult>;
|
|
446
|
+
|
|
418
447
|
weixin: WeixinNamespace;
|
|
419
448
|
|
|
420
449
|
/** 图片选择(Promise版本) */
|