@mpxjs/core 2.10.1-beta.1 → 2.10.1-beta.2
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
|
@@ -6,6 +6,8 @@ import { LIFECYCLE } from '../platform/patch/lifecycle/index'
|
|
|
6
6
|
import Mpx from '../index'
|
|
7
7
|
import { createElement, memo, useRef, useEffect } from 'react'
|
|
8
8
|
import * as ReactNative from 'react-native'
|
|
9
|
+
import { Image } from 'react-native'
|
|
10
|
+
|
|
9
11
|
import { initAppProvides } from './export/inject'
|
|
10
12
|
|
|
11
13
|
const appHooksMap = makeMap(mergeLifecycle(LIFECYCLE).app)
|
|
@@ -181,6 +183,7 @@ export default function createApp (options) {
|
|
|
181
183
|
}, [])
|
|
182
184
|
|
|
183
185
|
const { initialRouteName, initialParams } = initialRouteRef.current
|
|
186
|
+
const headerBackImageProps = Mpx.config.rnConfig.headerBackImageProps || null
|
|
184
187
|
const headerBackImageSource = Mpx.config.rnConfig.headerBackImageSource || null
|
|
185
188
|
const navScreenOpts = {
|
|
186
189
|
// 7.x替换headerBackTitleVisible
|
|
@@ -188,9 +191,13 @@ export default function createApp (options) {
|
|
|
188
191
|
headerBackTitleVisible: false,
|
|
189
192
|
// 安卓上会出现初始化时闪现导航条的问题
|
|
190
193
|
headerShown: false,
|
|
191
|
-
// 隐藏导航下的那条线
|
|
192
194
|
headerShadowVisible: false
|
|
193
195
|
}
|
|
196
|
+
if (headerBackImageProps) {
|
|
197
|
+
navScreenOpts.headerBackImage = () => {
|
|
198
|
+
return createElement(Image, headerBackImageProps)
|
|
199
|
+
}
|
|
200
|
+
}
|
|
194
201
|
if (headerBackImageSource) {
|
|
195
202
|
navScreenOpts.headerBackImageSource = headerBackImageSource
|
|
196
203
|
}
|