@tarojs/taro-h5 3.6.6-alpha.2 → 3.6.6
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/_virtual/_commonjsHelpers.js +35 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/lodash.js +4 -0
- package/dist/_virtual/lodash.js.map +1 -0
- package/dist/api/base/weapp/app-event.d.ts +10 -10
- package/dist/api/base/weapp/app-event.js +78 -9
- package/dist/api/base/weapp/app-event.js.map +1 -1
- package/dist/index.cjs.d.ts +23 -36
- package/dist/index.cjs.js +17366 -61
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +23 -36
- package/dist/index.esm.js +17366 -61
- package/dist/index.esm.js.map +1 -1
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js +17220 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js.map +1 -0
- package/dist/utils/handler.d.ts +13 -26
- package/dist/utils/handler.js +4 -16
- package/dist/utils/handler.js.map +1 -1
- package/package.json +8 -7
package/dist/index.esm.d.ts
CHANGED
|
@@ -72,22 +72,22 @@ declare const getSystemInfo: typeof Taro.getSystemInfo;
|
|
|
72
72
|
declare const updateWeChatApp: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
73
73
|
declare const getUpdateManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
74
74
|
// 应用级事件
|
|
75
|
-
declare const onUnhandledRejection:
|
|
76
|
-
declare const onThemeChange:
|
|
77
|
-
declare const onPageNotFound:
|
|
78
|
-
declare const onError:
|
|
75
|
+
declare const onUnhandledRejection: typeof Taro.onUnhandledRejection;
|
|
76
|
+
declare const onThemeChange: typeof Taro.onThemeChange;
|
|
77
|
+
declare const onPageNotFound: typeof Taro.onPageNotFound;
|
|
78
|
+
declare const onError: typeof Taro.onError;
|
|
79
79
|
declare const onAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
80
80
|
declare const onAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
81
81
|
declare const onAppShow: typeof Taro.onAppShow;
|
|
82
82
|
declare const onAppHide: typeof Taro.onAppHide;
|
|
83
|
-
declare const offUnhandledRejection:
|
|
84
|
-
declare const offThemeChange:
|
|
85
|
-
declare const offPageNotFound:
|
|
86
|
-
declare const offError:
|
|
83
|
+
declare const offUnhandledRejection: typeof Taro.offUnhandledRejection;
|
|
84
|
+
declare const offThemeChange: typeof Taro.offThemeChange;
|
|
85
|
+
declare const offPageNotFound: typeof Taro.offPageNotFound;
|
|
86
|
+
declare const offError: typeof Taro.offError;
|
|
87
87
|
declare const offAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
88
88
|
declare const offAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
89
|
-
declare const offAppShow: typeof Taro.
|
|
90
|
-
declare const offAppHide: typeof Taro.
|
|
89
|
+
declare const offAppShow: typeof Taro.offAppShow;
|
|
90
|
+
declare const offAppHide: typeof Taro.offAppHide;
|
|
91
91
|
// 生命周期
|
|
92
92
|
declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
|
|
93
93
|
declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
|
|
@@ -360,36 +360,23 @@ declare const createMediaAudioPlayer: (option?: {}, ...args: any[]) => Promise<P
|
|
|
360
360
|
*/
|
|
361
361
|
declare const createInnerAudioContext: typeof Taro.createInnerAudioContext;
|
|
362
362
|
declare const createAudioContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
363
|
-
type
|
|
364
|
-
interface ICallbackManagerOption {
|
|
365
|
-
callback?:
|
|
363
|
+
type TCallbackManagerFunc<T extends unknown[] = unknown[]> = (...arr: T) => void;
|
|
364
|
+
interface ICallbackManagerOption<T extends unknown[] = unknown[]> {
|
|
365
|
+
callback?: TCallbackManagerFunc<T>;
|
|
366
366
|
ctx?: any;
|
|
367
367
|
[key: string]: unknown;
|
|
368
368
|
}
|
|
369
|
-
type
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
add: (opt?: TCallbackManagerListItem) => void;
|
|
378
|
-
/**
|
|
379
|
-
* 移除回调
|
|
380
|
-
* @param {{ callback: function, ctx: any } | function} opt
|
|
381
|
-
*/
|
|
382
|
-
remove: (opt?: TCallbackManagerListItem) => void;
|
|
383
|
-
/**
|
|
384
|
-
* 获取回调函数数量
|
|
385
|
-
* @return {number}
|
|
386
|
-
*/
|
|
369
|
+
type TCallbackManagerUnit<T extends unknown[] = unknown[]> = (TCallbackManagerFunc<T> | ICallbackManagerOption<T>);
|
|
370
|
+
declare class CallbackManager<T extends unknown[] = unknown[]> {
|
|
371
|
+
callbacks: TCallbackManagerUnit<T>[];
|
|
372
|
+
/** 添加回调 */
|
|
373
|
+
add: (opt?: TCallbackManagerUnit<T>) => void;
|
|
374
|
+
/** 移除回调 */
|
|
375
|
+
remove: (opt?: TCallbackManagerUnit<T>) => void;
|
|
376
|
+
/** 获取回调函数数量 */
|
|
387
377
|
count: () => number;
|
|
388
|
-
/**
|
|
389
|
-
|
|
390
|
-
* @param {...any} args 回调的调用参数
|
|
391
|
-
*/
|
|
392
|
-
trigger: (...args: TCallbackManagerList) => void;
|
|
378
|
+
/** 触发回调 */
|
|
379
|
+
trigger: (...args: T) => void;
|
|
393
380
|
}
|
|
394
381
|
declare class BackgroundAudioManager implements Taro.BackgroundAudioManager {
|
|
395
382
|
Instance?: HTMLAudioElement;
|