@mpxjs/core 2.10.12 → 2.10.13
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/@types/index.d.ts
CHANGED
|
@@ -123,8 +123,8 @@ interface Context {
|
|
|
123
123
|
getPageId: WechatMiniprogram.Component.InstanceMethods<Record<string, any>>['getPageId']
|
|
124
124
|
}
|
|
125
125
|
type ExtendedComponentOptions = {
|
|
126
|
-
disconnectOnUnmounted
|
|
127
|
-
shallowReactivePattern
|
|
126
|
+
disconnectOnUnmounted?: boolean
|
|
127
|
+
shallowReactivePattern?: RegExp
|
|
128
128
|
} & WechatMiniprogram.Component.ComponentOptions
|
|
129
129
|
|
|
130
130
|
interface ComponentOpt<D extends Data, P extends Properties, C, M extends Methods, Mi extends Array<any>, S extends Record<any, any>> extends Partial<WechatMiniprogram.Component.Lifetimes & WechatMiniprogram.Component.OtherOption> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/core",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.13",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"main": "src/index.js",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@mpxjs/utils": "^2.10.
|
|
22
|
+
"@mpxjs/utils": "^2.10.13",
|
|
23
23
|
"lodash": "^4.1.1",
|
|
24
24
|
"miniprogram-api-typings": "^3.10.0"
|
|
25
25
|
},
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"url": "https://github.com/didi/mpx/issues"
|
|
110
110
|
},
|
|
111
111
|
"sideEffects": false,
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "1b4a2d4765341ef6c6b74e501f72a0f856f247f9"
|
|
113
113
|
}
|
|
@@ -18,7 +18,6 @@ export function init (Mpx) {
|
|
|
18
18
|
Mpx.i18n = createI18n(global.i18n)
|
|
19
19
|
}
|
|
20
20
|
initGlobalErrorHandling()
|
|
21
|
-
initGlobalLazyLoadHandling()
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
function initGlobalErrorHandling () {
|
|
@@ -65,13 +64,3 @@ function initGlobalErrorHandling () {
|
|
|
65
64
|
require('promise/setimmediate/rejection-tracking').enable(rejectionTrackingOptions)
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
|
-
|
|
69
|
-
function initGlobalLazyLoadHandling () {
|
|
70
|
-
global.onLazyLoadError = function (error) {
|
|
71
|
-
if (global.__mpxAppCbs?.lazyLoad?.length) {
|
|
72
|
-
global.__mpxAppCbs.lazyLoad.forEach((cb) => {
|
|
73
|
-
cb(error)
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -3,7 +3,7 @@ import * as ReactNative from 'react-native'
|
|
|
3
3
|
import { ReactiveEffect } from '../../observer/effect'
|
|
4
4
|
import { watch } from '../../observer/watch'
|
|
5
5
|
import { del, reactive, set } from '../../observer/reactive'
|
|
6
|
-
import { hasOwn, isFunction, noop, isObject, isArray, getByPath, collectDataset, hump2dash, dash2hump, callWithErrorHandling, wrapMethodsWithErrorHandling, error } from '@mpxjs/utils'
|
|
6
|
+
import { hasOwn, isFunction, noop, isObject, isArray, getByPath, collectDataset, hump2dash, dash2hump, callWithErrorHandling, wrapMethodsWithErrorHandling, error, setFocusedNavigation } from '@mpxjs/utils'
|
|
7
7
|
import MpxProxy from '../../core/proxy'
|
|
8
8
|
import { BEFOREUPDATE, ONLOAD, UPDATED, ONSHOW, ONHIDE, ONRESIZE, REACTHOOKSEXEC } from '../../core/innerLifecycle'
|
|
9
9
|
import mergeOptions from '../../core/mergeOptions'
|
|
@@ -301,6 +301,7 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
301
301
|
instance.route = props.route.name
|
|
302
302
|
global.__mpxPagesMap = global.__mpxPagesMap || {}
|
|
303
303
|
global.__mpxPagesMap[props.route.key] = [instance, props.navigation]
|
|
304
|
+
setFocusedNavigation(props.navigation)
|
|
304
305
|
// App onLaunch 在 Page created 之前执行
|
|
305
306
|
if (!global.__mpxAppHotLaunched && global.__mpxAppOnLaunch) {
|
|
306
307
|
global.__mpxAppOnLaunch(props.navigation)
|