@mpxjs/core 2.7.44 → 2.7.47

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.44",
3
+ "version": "2.7.47",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -42,5 +42,5 @@
42
42
  "url": "https://github.com/didi/mpx/issues"
43
43
  },
44
44
  "sideEffects": false,
45
- "gitHead": "306aee23bc55c7f1af58b8de0c6e6394370c88d4"
45
+ "gitHead": "05354d5750021d76f4bf0ae2a4ab73fb2f8ef83b"
46
46
  }
@@ -43,8 +43,18 @@ export default function pageStatusMixin (mixinType) {
43
43
  currentPage = this.$page
44
44
  } else {
45
45
  const pages = getCurrentPages()
46
- currentPage = pages[pages.length - 1]
46
+ if (typeof this.getPageId === 'function') {
47
+ const currentPageId = this.getPageId()
48
+ for (let page of pages) {
49
+ if (typeof page.getPageId === 'function' && currentPageId === page.getPageId()) {
50
+ currentPage = page
51
+ break
52
+ }
53
+ }
54
+ }
55
+ currentPage = currentPage || pages[pages.length - 1]
47
56
  }
57
+
48
58
  if (currentPage) {
49
59
  this.$watch(() => currentPage.mpxPageStatus, (val) => {
50
60
  if (val) {