@mpxjs/core 2.7.30 → 2.7.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.7.30",
3
+ "version": "2.7.33",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -41,5 +41,5 @@
41
41
  "url": "https://github.com/didi/mpx/issues"
42
42
  },
43
43
  "sideEffects": false,
44
- "gitHead": "0b9f0dd47f78be746a4ada01578dd89cc3b2f130"
44
+ "gitHead": "c1d2e39bcfef9bf20484dcbb301381b86a5939e6"
45
45
  }
@@ -35,7 +35,7 @@ export default function pageStatusMixin (mixinType) {
35
35
  [CREATED] () {
36
36
  const options = this.$rawOptions
37
37
  const hasPageShow = options.pageShow || options.pageHide
38
- const needPageLifetimes = options.pageLifetimes && (__mpx_mode__ === 'ali' || __mpx_mode__ === 'tt')
38
+ const needPageLifetimes = options.pageLifetimes && __mpx_mode__ === 'ali'
39
39
 
40
40
  if (hasPageShow || needPageLifetimes) {
41
41
  let currentPage
@@ -22,7 +22,8 @@ const setComponentRef = function (target, ref, context, isAsync) {
22
22
  enumerable: true,
23
23
  configurable: true,
24
24
  get () {
25
- if (!cacheRef) {
25
+ // wx由于分包异步化的存在,每次访问refs都需要重新执行selectComponen,避免一直拿到缓存中的placeholder
26
+ if (__mpx_mode__ === 'wx' || !cacheRef) {
26
27
  return (cacheRef = context.__getRefNode(ref, isAsync))
27
28
  }
28
29
  return cacheRef