@mpxjs/core 2.9.69-beta.2 → 2.9.69-beta.3
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
|
@@ -183,7 +183,6 @@ export default function createApp (option, config = {}) {
|
|
|
183
183
|
const { initialRouteName, initialParams } = initialRouteRef.current
|
|
184
184
|
const headerBackImageProps = Mpx.config.rnConfig.headerBackImageProps || null
|
|
185
185
|
const navScreenOpts = {
|
|
186
|
-
gestureEnabled: true,
|
|
187
186
|
// 7.x替换headerBackTitleVisible
|
|
188
187
|
// headerBackButtonDisplayMode: 'minimal',
|
|
189
188
|
headerBackTitleVisible: false,
|
|
@@ -367,6 +367,12 @@ function usePageStatus (navigation, pageId) {
|
|
|
367
367
|
const blurSubscription = navigation.addListener('blur', () => {
|
|
368
368
|
pageStatusMap[pageId] = 'hide'
|
|
369
369
|
})
|
|
370
|
+
const transitionEndSubscription = navigation.addListener('transitionEnd', () => {
|
|
371
|
+
if (global.__navigationHelper.transitionEndCallback) {
|
|
372
|
+
global.__navigationHelper.transitionEndCallback()
|
|
373
|
+
global.__navigationHelper.transitionEndCallback = null
|
|
374
|
+
}
|
|
375
|
+
})
|
|
370
376
|
const unWatchAppFocusedState = watch(global.__mpxAppFocusedState, (value) => {
|
|
371
377
|
pageStatusMap[pageId] = value
|
|
372
378
|
})
|
|
@@ -375,6 +381,7 @@ function usePageStatus (navigation, pageId) {
|
|
|
375
381
|
focusSubscription()
|
|
376
382
|
blurSubscription()
|
|
377
383
|
unWatchAppFocusedState()
|
|
384
|
+
transitionEndSubscription()
|
|
378
385
|
del(pageStatusMap, pageId)
|
|
379
386
|
}
|
|
380
387
|
}, [navigation])
|
|
@@ -530,9 +537,11 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
|
|
|
530
537
|
|
|
531
538
|
useEffect(() => {
|
|
532
539
|
const unsubscribe = navigation.addListener('transitionEnd', (e) => {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
540
|
+
setTimeout(() => {
|
|
541
|
+
rootRef.current?.measureInWindow((x, y, width, height) => {
|
|
542
|
+
navigation.layout = { x, y, width, height }
|
|
543
|
+
})
|
|
544
|
+
}, 200)
|
|
536
545
|
});
|
|
537
546
|
return unsubscribe;
|
|
538
547
|
}, [navigation]);
|