@tarojs/taro-h5 3.5.6-alpha.1 → 3.5.6-alpha.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/api/base/weapp/life-cycle.d.ts +3 -6
- package/dist/api/base/weapp/life-cycle.js +14 -3
- package/dist/index.cjs.d.ts +2 -6
- package/dist/index.cjs.js +13 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +2 -6
- package/dist/index.esm.js +13 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/taroApis.d.ts +2 -6
- package/package.json +4 -4
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const getEnterOptionsSync: () => Promise<{
|
|
5
|
-
errMsg: string;
|
|
6
|
-
}>;
|
|
1
|
+
import Taro from '@tarojs/api';
|
|
2
|
+
export declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
|
|
3
|
+
export declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Taro from '@tarojs/api';
|
|
2
|
+
const launchOptions = {
|
|
3
|
+
path: '',
|
|
4
|
+
query: {},
|
|
5
|
+
scene: 0,
|
|
6
|
+
shareTicket: '',
|
|
7
|
+
referrerInfo: {}
|
|
8
|
+
};
|
|
9
|
+
function initLaunchOptions(options = {}) {
|
|
10
|
+
Object.assign(launchOptions, options);
|
|
11
|
+
}
|
|
12
|
+
Taro.eventCenter.once('__taroRouterLaunch', initLaunchOptions);
|
|
2
13
|
// 生命周期
|
|
3
|
-
export const getLaunchOptionsSync =
|
|
4
|
-
export const getEnterOptionsSync =
|
|
14
|
+
export const getLaunchOptionsSync = () => launchOptions;
|
|
15
|
+
export const getEnterOptionsSync = () => launchOptions;
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -137,12 +137,8 @@ declare const offAudioInterruptionBegin: () => Promise<{
|
|
|
137
137
|
declare const offAppShow: typeof Taro.offWindowResize;
|
|
138
138
|
declare const offAppHide: typeof Taro.offWindowResize;
|
|
139
139
|
// 生命周期
|
|
140
|
-
declare const getLaunchOptionsSync:
|
|
141
|
-
|
|
142
|
-
}>;
|
|
143
|
-
declare const getEnterOptionsSync: () => Promise<{
|
|
144
|
-
errMsg: string;
|
|
145
|
-
}>;
|
|
140
|
+
declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
|
|
141
|
+
declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
|
|
146
142
|
// 画布
|
|
147
143
|
/** 创建离屏 canvas 实例 */
|
|
148
144
|
declare const createOffscreenCanvas: () => Promise<{
|
package/dist/index.cjs.js
CHANGED
|
@@ -799,9 +799,20 @@ const offAppHide = callback => {
|
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
801
|
|
|
802
|
+
const launchOptions = {
|
|
803
|
+
path: '',
|
|
804
|
+
query: {},
|
|
805
|
+
scene: 0,
|
|
806
|
+
shareTicket: '',
|
|
807
|
+
referrerInfo: {}
|
|
808
|
+
};
|
|
809
|
+
function initLaunchOptions(options = {}) {
|
|
810
|
+
Object.assign(launchOptions, options);
|
|
811
|
+
}
|
|
812
|
+
Taro__default["default"].eventCenter.once('__taroRouterLaunch', initLaunchOptions);
|
|
802
813
|
// 生命周期
|
|
803
|
-
const getLaunchOptionsSync =
|
|
804
|
-
const getEnterOptionsSync =
|
|
814
|
+
const getLaunchOptionsSync = () => launchOptions;
|
|
815
|
+
const getEnterOptionsSync = () => launchOptions;
|
|
805
816
|
|
|
806
817
|
// TODO env 环境变量
|
|
807
818
|
const canIUse = temporarilyNotSupport('canIUse');
|