Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/didi/mpx into feat-hover-…
Browse files Browse the repository at this point in the history
…style
  • Loading branch information
shangqunfeng committed Dec 24, 2024
2 parents 7834e70 + e8627f1 commit 8c3d8b9
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/core/src/platform/createApp.ios.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import transferOptions from '../core/transferOptions'
import builtInKeysMap from './patch/builtInKeysMap'
import { makeMap, spreadProp, parseUrlQuery, getFocusedNavigation, hasOwn, extend } from '@mpxjs/utils'
import { makeMap, spreadProp, getFocusedNavigation, hasOwn, extend } from '@mpxjs/utils'
import { mergeLifecycle } from '../convertor/mergeLifecycle'
import { LIFECYCLE } from '../platform/patch/lifecycle/index'
import Mpx from '../index'
Expand Down Expand Up @@ -96,14 +96,10 @@ export default function createApp (option, config = {}) {
})

if (!global.__mpxAppLaunched) {
const parsed = Mpx.config.rnConfig.parseAppProps?.(props) || {}
if (parsed.url) {
const { path, queryObj } = parseUrlQuery(parsed.url)
Object.assign(initialRouteRef.current, {
initialRouteName: path.startsWith('/') ? path.slice(1) : path,
initialParams: queryObj
})
}
const { initialRouteName, initialParams } = Mpx.config.rnConfig.parseAppProps?.(props) || {}
initialRouteRef.current.initialRouteName = initialRouteName || initialRouteRef.current.initialRouteName
initialRouteRef.current.initialParams = initialParams || initialRouteRef.current.initialParams

global.__mpxAppOnLaunch = (navigation) => {
global.__mpxAppLaunched = true
const state = navigation.getState()
Expand Down

0 comments on commit 8c3d8b9

Please sign in to comment.