Skip to content

Commit

Permalink
Merge pull request #1764 from didi/feat-supplement-1202
Browse files Browse the repository at this point in the history
Feat supplement 1202
  • Loading branch information
hiyuki authored Dec 19, 2024
2 parents 0022742 + a2ca855 commit 3dfe8ac
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ function setNavigationBarColor (options = {}) {
return ENV_OBJ.setNavigationBar(options)
}

function hideHomeButton (options = {}) {
return ENV_OBJ.hideBackHome(options)
}

export {
setNavigationBarTitle,
setNavigationBarColor
setNavigationBarColor,
hideHomeButton
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { successHandle, failHandle, getFocusedNavigation } from '../../../common/js'
import { successHandle, failHandle, getFocusedNavigation, envError } from '../../../common/js'
import { nextTick } from '../next-tick'
function setNavigationBarTitle (options = {}) {
const { title = '', success, fail, complete } = options
Expand Down Expand Up @@ -31,7 +31,10 @@ function setNavigationBarColor (options = {}) {
}
}

const hideHomeButton = envError('hideHomeButton')

export {
setNavigationBarTitle,
setNavigationBarColor
setNavigationBarColor,
hideHomeButton
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const setNavigationBarTitle = ENV_OBJ.setNavigationBarTitle || envError('setNavi

const setNavigationBarColor = ENV_OBJ.setNavigationBarColor || envError('setNavigationBarColor')

const hideHomeButton = ENV_OBJ.hideHomeButton || envError('hideHomeButton')

export {
setNavigationBarTitle,
setNavigationBarColor
setNavigationBarColor,
hideHomeButton
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isBrowser, throwSSRWarning, successHandle } from '../../../common/js'
import { isBrowser, envError, throwSSRWarning, successHandle } from '../../../common/js'

function setNavigationBarTitle (options = {}) {
if (!isBrowser) {
Expand Down Expand Up @@ -26,7 +26,10 @@ function setNavigationBarColor (options = {}) {
successHandle({ errMsg: 'setNavigationBarColor:ok' }, success, complete)
}

const hideHomeButton = envError('hideHomeButton')

export {
setNavigationBarTitle,
setNavigationBarColor
setNavigationBarColor,
hideHomeButton
}
19 changes: 19 additions & 0 deletions packages/api-proxy/src/platform/api/setting/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ENV_OBJ, envError } from '../../../common/js'

const getSetting = ENV_OBJ.getSetting || envError('getSetting')

const openSetting = ENV_OBJ.openSetting || envError('openSetting')

const enableAlertBeforeUnload = ENV_OBJ.enableAlertBeforeUnload || envError('enableAlertBeforeUnload')

const disableAlertBeforeUnload = ENV_OBJ.disableAlertBeforeUnload || envError('disableAlertBeforeUnload')

const getMenuButtonBoundingClientRect = ENV_OBJ.getMenuButtonBoundingClientRect || envError('getMenuButtonBoundingClientRect')

export {
getSetting,
openSetting,
enableAlertBeforeUnload,
disableAlertBeforeUnload,
getMenuButtonBoundingClientRect
}
3 changes: 3 additions & 0 deletions packages/api-proxy/src/platform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ export * from './api/vibrate'

// onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard
export * from './api/keyboard'

// getSetting, openSetting, enableAlertBeforeUnload, disableAlertBeforeUnload, getMenuButtonBoundingClientRect
export * from './api/setting'

0 comments on commit 3dfe8ac

Please sign in to comment.