@mpxjs/core 2.10.8 → 2.10.9
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.10.
|
|
3
|
+
"version": "2.10.9",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"url": "https://github.com/didi/mpx/issues"
|
|
110
110
|
},
|
|
111
111
|
"sideEffects": false,
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "be35dbe5958da40bf149768171798b4776e63937"
|
|
113
113
|
}
|
|
@@ -73,17 +73,20 @@ export default function createApp (options) {
|
|
|
73
73
|
children
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
|
+
const getComponent = () => {
|
|
77
|
+
return item.displayName ? item : item()
|
|
78
|
+
}
|
|
76
79
|
if (key === initialRouteName) {
|
|
77
80
|
return createElement(Stack.Screen, {
|
|
78
81
|
name: key,
|
|
79
|
-
getComponent
|
|
82
|
+
getComponent,
|
|
80
83
|
initialParams,
|
|
81
84
|
layout: headerLayout
|
|
82
85
|
})
|
|
83
86
|
}
|
|
84
87
|
return createElement(Stack.Screen, {
|
|
85
88
|
name: key,
|
|
86
|
-
getComponent
|
|
89
|
+
getComponent,
|
|
87
90
|
layout: headerLayout
|
|
88
91
|
})
|
|
89
92
|
})
|
|
@@ -53,8 +53,8 @@ function createEffect (proxy, componentsMap) {
|
|
|
53
53
|
const appComponentsMap = global.__appComponentsMap || {}
|
|
54
54
|
const generichash = proxy.target.generichash || ''
|
|
55
55
|
const genericComponentsMap = global.__mpxGenericsMap?.[generichash] || {}
|
|
56
|
-
const
|
|
57
|
-
return
|
|
56
|
+
const component = componentsMap[tagName] || genericComponentsMap[tagName] || appComponentsMap[tagName]
|
|
57
|
+
return component ? component.displayName ? component : component() : getByPath(ReactNative, tagName)
|
|
58
58
|
}
|
|
59
59
|
const innerCreateElement = (type, ...rest) => {
|
|
60
60
|
if (!type) return null
|