@tarojs/taro-h5 3.5.6-alpha.0 → 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.
@@ -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: () => Promise<{
141
- errMsg: string;
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.esm.js CHANGED
@@ -791,9 +791,20 @@ const offAppHide = callback => {
791
791
  }
792
792
  };
793
793
 
794
+ const launchOptions = {
795
+ path: '',
796
+ query: {},
797
+ scene: 0,
798
+ shareTicket: '',
799
+ referrerInfo: {}
800
+ };
801
+ function initLaunchOptions(options = {}) {
802
+ Object.assign(launchOptions, options);
803
+ }
804
+ Taro.eventCenter.once('__taroRouterLaunch', initLaunchOptions);
794
805
  // 生命周期
795
- const getLaunchOptionsSync = temporarilyNotSupport('getLaunchOptionsSync');
796
- const getEnterOptionsSync = temporarilyNotSupport('getEnterOptionsSync');
806
+ const getLaunchOptionsSync = () => launchOptions;
807
+ const getEnterOptionsSync = () => launchOptions;
797
808
 
798
809
  // TODO env 环境变量
799
810
  const canIUse = temporarilyNotSupport('canIUse');