From 2efd49c0d7713433565aa55958afb52d7f9dde28 Mon Sep 17 00:00:00 2001 From: sun-xinyan Date: Fri, 30 Aug 2024 15:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=83=BD=E5=8A=9B=E6=94=AF?= =?UTF-8?q?=E6=8C=81bindSheet=E9=81=BF=E8=AE=A9=E9=94=AE=E7=9B=98=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sun-xinyan Change-Id: Id25276c247b1a7a547118153404e0f38427b011e --- api/@internal/component/ets/common.d.ts | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 087b0cd46..1a2527b02 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -11080,6 +11080,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 * @@ -11559,6 +11612,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; } /**