qsh-webview-sdk 2.4.1 → 2.4.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
CHANGED
|
@@ -274,10 +274,7 @@ declare namespace UniWebView {
|
|
|
274
274
|
title?: string;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
type ShareUniversalPayload =
|
|
278
|
-
| ShareUniversalPayloadWeb
|
|
279
|
-
| ShareUniversalPayloadText
|
|
280
|
-
| ShareUniversalPayloadImage;
|
|
277
|
+
type ShareUniversalPayload = ShareUniversalPayloadWeb | ShareUniversalPayloadText | ShareUniversalPayloadImage;
|
|
281
278
|
|
|
282
279
|
interface ShareResult {
|
|
283
280
|
errMsg?: string;
|
|
@@ -316,7 +313,7 @@ declare namespace UniWebView {
|
|
|
316
313
|
interface ShareMiniProgramCardPayload {
|
|
317
314
|
title: string;
|
|
318
315
|
imageUrl: string;
|
|
319
|
-
/**
|
|
316
|
+
/** 目标小程序页面路径 */
|
|
320
317
|
targetPath: string;
|
|
321
318
|
/** 目标小程序 appid */
|
|
322
319
|
appid: string;
|
|
@@ -483,26 +480,18 @@ declare namespace UniWebView {
|
|
|
483
480
|
/** WebView 对象(兼容旧版本) */
|
|
484
481
|
webView: WebView | null;
|
|
485
482
|
|
|
486
|
-
navigateToMiniProgram(
|
|
487
|
-
|
|
488
|
-
): Promise<MiniProgramNavigateResult> | void;
|
|
489
|
-
navigateToMiniProgramAsync(
|
|
490
|
-
options: Omit<MiniProgramNavigateOptions, "success" | "fail" | "complete">,
|
|
491
|
-
): Promise<MiniProgramNavigateResult>;
|
|
483
|
+
navigateToMiniProgram(options: MiniProgramNavigateOptions): Promise<MiniProgramNavigateResult> | void;
|
|
484
|
+
navigateToMiniProgramAsync(options: Omit<MiniProgramNavigateOptions, "success" | "fail" | "complete">): Promise<MiniProgramNavigateResult>;
|
|
492
485
|
|
|
493
486
|
weixin: WeixinNamespace;
|
|
494
487
|
|
|
495
488
|
/** 图片选择(Promise版本) */
|
|
496
|
-
chooseImageAsync(
|
|
497
|
-
options?: Omit<ChooseImageOptions, "success" | "fail" | "complete">,
|
|
498
|
-
): Promise<ChooseImageResult>;
|
|
489
|
+
chooseImageAsync(options?: Omit<ChooseImageOptions, "success" | "fail" | "complete">): Promise<ChooseImageResult>;
|
|
499
490
|
/** 获取图片功能能力信息 */
|
|
500
491
|
getImageCapabilities(): ImageCapabilities;
|
|
501
492
|
|
|
502
493
|
/** 位置选择(Promise版本) */
|
|
503
|
-
chooseLocationAsync(
|
|
504
|
-
options?: Omit<ChooseLocationOptions, "success" | "fail" | "complete">,
|
|
505
|
-
): Promise<ChooseLocationResult>;
|
|
494
|
+
chooseLocationAsync(options?: Omit<ChooseLocationOptions, "success" | "fail" | "complete">): Promise<ChooseLocationResult>;
|
|
506
495
|
/** 获取位置选择功能能力信息 */
|
|
507
496
|
getChooseLocationCapabilities(): ChooseLocationCapabilities;
|
|
508
497
|
|
|
@@ -514,42 +503,31 @@ declare namespace UniWebView {
|
|
|
514
503
|
/** 定向分享模块:仅 H5 -> 宿主 WebView */
|
|
515
504
|
shareDirected(options: ShareDirectedOptions): Promise<ShareResult> | void;
|
|
516
505
|
shareMiniProgramCard(options: ShareMiniProgramCardOptions): Promise<ShareResult> | void;
|
|
517
|
-
shareDirectedAsync(
|
|
518
|
-
options: Omit<ShareDirectedOptions, "success" | "fail" | "complete">,
|
|
519
|
-
): Promise<ShareResult>;
|
|
506
|
+
shareDirectedAsync(options: Omit<ShareDirectedOptions, "success" | "fail" | "complete">): Promise<ShareResult>;
|
|
520
507
|
|
|
521
|
-
|
|
508
|
+
/** 手动分享预览:仅微信小程序 web-view,触发宿主分享弹窗 */
|
|
522
509
|
manualShare(options: ManualShareOptions): Promise<ShareResult> | void;
|
|
523
|
-
manualShareAsync(
|
|
524
|
-
options: Omit<ManualShareOptions, "success" | "fail" | "complete">,
|
|
525
|
-
): Promise<ShareResult>;
|
|
510
|
+
manualShareAsync(options: Omit<ManualShareOptions, "success" | "fail" | "complete">): Promise<ShareResult>;
|
|
526
511
|
|
|
527
512
|
/** 蓝牙 API */
|
|
528
513
|
openBluetoothAdapter(options?: BluetoothOptions): Promise<any> | void;
|
|
529
514
|
openBluetoothAdapterAsync(options?: BluetoothOptions): Promise<any>;
|
|
530
|
-
startBluetoothDevicesDiscovery(
|
|
531
|
-
|
|
532
|
-
): Promise<any> | void;
|
|
533
|
-
startBluetoothDevicesDiscoveryAsync(
|
|
534
|
-
options?: BluetoothOptions,
|
|
535
|
-
): Promise<any>;
|
|
515
|
+
startBluetoothDevicesDiscovery(options?: BluetoothOptions): Promise<any> | void;
|
|
516
|
+
startBluetoothDevicesDiscoveryAsync(options?: BluetoothOptions): Promise<any>;
|
|
536
517
|
onBluetoothDeviceFound(options?: BluetoothOptions): Promise<any> | void;
|
|
537
518
|
onBluetoothDeviceFoundAsync(options?: BluetoothOptions): Promise<any>;
|
|
538
519
|
createBLEConnection(options?: BluetoothOptions): Promise<any> | void;
|
|
539
520
|
createBLEConnectionAsync(options?: BluetoothOptions): Promise<any>;
|
|
540
521
|
|
|
541
522
|
/** 打印PDF API */
|
|
542
|
-
printPdf(
|
|
543
|
-
options: PrintPdfOptions,
|
|
544
|
-
callback: (result: PrintPdfResult) => void,
|
|
545
|
-
): void;
|
|
523
|
+
printPdf(options: PrintPdfOptions, callback: (result: PrintPdfResult) => void): void;
|
|
546
524
|
printPdfAsync(options: PrintPdfOptions): Promise<PrintPdfResult>;
|
|
547
525
|
/** 获取打印PDF功能能力信息 */
|
|
548
526
|
getPrintCapabilities(): PrintPdfCapabilities;
|
|
549
527
|
|
|
550
528
|
/**
|
|
551
|
-
|
|
552
|
-
|
|
529
|
+
* 人脸识别(仅支持微信小程序和 UniApp 环境)
|
|
530
|
+
* 微信环境通过 wx.miniProgram.navigateTo 跳转宿主 /pages/face/index,UniApp 环境通过桥接调用宿主实现
|
|
553
531
|
*/
|
|
554
532
|
faceVerify(options: FaceVerifyOptions): void;
|
|
555
533
|
/** 获取人脸识别功能能力信息 */
|
|
@@ -3890,11 +3890,8 @@ function ti(t) {
|
|
|
3890
3890
|
}
|
|
3891
3891
|
function Ne(t = "", e = "targetPath") {
|
|
3892
3892
|
if (!t || typeof t != "string")
|
|
3893
|
-
throw { errMsg: `share: ${e}
|
|
3894
|
-
const r = t.trim();
|
|
3895
|
-
if (!/^\/pages\//.test(r))
|
|
3896
|
-
throw { errMsg: `share: ${e} 必须是最终小程序页面路径,例如 /pages/xxx/index?foo=1`, code: "PARAM_INVALID" };
|
|
3897
|
-
const [, n = ""] = r.split("?");
|
|
3893
|
+
throw { errMsg: `share: ${e} 必须是最终小程序页面路径`, code: "PARAM_INVALID" };
|
|
3894
|
+
const r = t.trim(), [, n = ""] = r.split("?");
|
|
3898
3895
|
return { path: r, query: n };
|
|
3899
3896
|
}
|
|
3900
3897
|
function Nt(t = "", e = "webTarget") {
|