Skip to content

Commit

Permalink
Merge branch 'master' into fix-scoped-deep
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki authored Dec 19, 2024
2 parents 40b44c0 + 3dfe8ac commit bba979f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 11 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'
5 changes: 1 addition & 4 deletions packages/core/src/platform/patch/getDefaultOptions.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,7 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
backgroundColor: pageConfig.backgroundColor || '#ffffff'
},
ref: rootRef,
onLayout,
onTouchStart: () => {
ReactNative.Keyboard.isVisible() && ReactNative.Keyboard.dismiss()
}
onLayout
},
createElement(RouteContext.Provider,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const Input = forwardRef<HandlerRef<TextInput, FinalInputProps>, FinalInputProps
{ padding: 0, backgroundColor: '#fff' },
style,
multiline && autoHeight
? { height: Math.max((style as any)?.minHeight || 35, contentHeight) }
? { minHeight: Math.max((style as any)?.minHeight || 35, contentHeight) }
: {}
)

Expand Down

0 comments on commit bba979f

Please sign in to comment.