@mpxjs/core 2.10.1-beta.3 → 2.10.1-beta.8
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
|
@@ -12,8 +12,8 @@ import { initAppProvides } from './export/inject'
|
|
|
12
12
|
|
|
13
13
|
const appHooksMap = makeMap(mergeLifecycle(LIFECYCLE).app)
|
|
14
14
|
|
|
15
|
-
function
|
|
16
|
-
return window.width
|
|
15
|
+
function getPageSize (window = ReactNative.Dimensions.get('window')) {
|
|
16
|
+
return window.width + 'x' + window.height
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function filterOptions (options, appData) {
|
|
@@ -166,11 +166,11 @@ export default function createApp (options) {
|
|
|
166
166
|
})
|
|
167
167
|
|
|
168
168
|
let count = 0
|
|
169
|
-
let
|
|
169
|
+
let lastPageSize = getPageSize()
|
|
170
170
|
const resizeSubScription = ReactNative.Dimensions.addEventListener('change', ({ window }) => {
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
|
|
171
|
+
const pageSize = getPageSize(window)
|
|
172
|
+
if (pageSize === lastPageSize) return
|
|
173
|
+
lastPageSize = pageSize
|
|
174
174
|
const navigation = getFocusedNavigation()
|
|
175
175
|
if (navigation && hasOwn(global.__mpxPageStatusMap, navigation.pageId)) {
|
|
176
176
|
global.__mpxPageStatusMap[navigation.pageId] = `resize${count++}`
|
|
@@ -576,7 +576,7 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
|
|
|
576
576
|
const isCustom = pageConfig.navigationStyle === 'custom'
|
|
577
577
|
navigation.setOptions({
|
|
578
578
|
headerShown: !isCustom,
|
|
579
|
-
title: pageConfig.navigationBarTitleText || '',
|
|
579
|
+
title: pageConfig.navigationBarTitleText?.trim() || '',
|
|
580
580
|
headerStyle: {
|
|
581
581
|
backgroundColor: pageConfig.navigationBarBackgroundColor || '#000000'
|
|
582
582
|
},
|