-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1383 from didi/feat-navigator-open-type-v2
feat: 支持 getEnterOptionsSync api
- Loading branch information
Showing
6 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function getEnterOptionsSync () { | ||
my.getEnterOptionsSync() | ||
} | ||
|
||
export { | ||
getEnterOptionsSync | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getEnvObj, envError } from '../../../common/js' | ||
|
||
const ENV_OBJ = getEnvObj() | ||
|
||
const getEnterOptionsSync = ENV_OBJ.getEnterOptionsSync || envError('getEnterOptionsSync') | ||
|
||
export { | ||
getEnterOptionsSync | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/api-proxy/src/platform/api/lifecycle/index.web.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { isBrowser, throwSSRWarning } from '../../../common/js' | ||
function getEnterOptionsSync () { | ||
if (!isBrowser) { | ||
throwSSRWarning('getEnterOptionsSync API is running in non browser environments') | ||
return | ||
} | ||
return global.__mpxEnterOptions || {} | ||
} | ||
|
||
export { | ||
getEnterOptionsSync | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters