!13748 新增能力支持bindSheet避让键盘模式选择

Merge pull request !13748 from 孙鑫炎/dev_bindAvoid
This commit is contained in:
openharmony_ci 2024-09-14 11:47:58 +00:00 committed by Gitee
commit 42fe88342c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -11233,6 +11233,59 @@ declare enum ScrollSizeMode {
CONTINUOUS = 1,
}
/**
* Define the mode of sheet how to avoid keyboard.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
declare enum SheetKeyboardAvoidMode {
/**
* Sheet will not aovid keyboard.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
NONE = 0,
/**
* Firstly sheet will avoid keyboard by changing its height.
* And then sheet will avoid by resizing after reaching its maximum height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
TRANSLATE_AND_RESIZE = 1,
/**
* Sheet will only avoid keyboard by resizing the content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
RESIZE_ONLY = 2,
/**
* Firstly sheet will avoid keyboard by changing its height.
* And then sheet will avoid keyboard by scrolling after reaching its maximum height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
TRANSLATE_AND_SCROLL = 3,
}
/**
* Component sheet dismiss
*
@ -11712,6 +11765,18 @@ declare interface SheetOptions extends BindOptions {
* @since 12
*/
uiContext?: UIContext;
/**
* Determine the mode of sheet how to avoid keyboard.
*
* @type { ?SheetKeyboardAvoidMode }
* @default SheetKeyboardAvoidMode.TRANSLATE_AND_SCROLL
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 14
*/
keyboardAvoidMode?: SheetKeyboardAvoidMode;
}
/**