@tarojs/runtime 3.4.5 → 3.5.0-alpha.0

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.
@@ -4461,7 +4461,12 @@ function stringify(obj) {
4461
4461
  }
4462
4462
  function getPath(id, options) {
4463
4463
  const idx = id.indexOf('?');
4464
- return `${idx > -1 ? id.substring(0, idx) : id}${stringify(process.env.TARO_ENV === 'h5' ? { stamp: (options === null || options === void 0 ? void 0 : options.stamp) || '' } : options)}`;
4464
+ if (process.env.TARO_ENV === 'h5') {
4465
+ return `${idx > -1 ? id.substring(0, idx) : id}${stringify((options === null || options === void 0 ? void 0 : options.stamp) ? { stamp: options.stamp } : {})}`;
4466
+ }
4467
+ else {
4468
+ return `${idx > -1 ? id.substring(0, idx) : id}${stringify(options)}`;
4469
+ }
4465
4470
  }
4466
4471
  function getOnReadyEventKey(path) {
4467
4472
  return path + '.' + ON_READY;
@@ -4535,6 +4540,8 @@ function createPageConfig(component, pageName, data, pageConfig) {
4535
4540
  },
4536
4541
  [ONUNLOAD]() {
4537
4542
  const $taroPath = this.$taroPath;
4543
+ // 触发onUnload生命周期
4544
+ safeExecute($taroPath, ONUNLOAD);
4538
4545
  unmounting = true;
4539
4546
  Current.app.unmount($taroPath, () => {
4540
4547
  unmounting = false;