From f9218fb7f2a987f86d5da6fe7af819b2161fb01b Mon Sep 17 00:00:00 2001 From: lijuan124 Date: Fri, 20 Jun 2025 10:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=95=B0=E5=AD=97=E7=BF=BB?= =?UTF-8?q?=E7=89=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lijuan124 --- api/@internal/component/ets/text.d.ts | 11 ++ api/@internal/component/ets/text_common.d.ts | 115 ++++++++++++++++++- 2 files changed, 122 insertions(+), 4 deletions(-) diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index a68adcea27..e2995382db 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -1699,6 +1699,17 @@ declare class TextAttribute extends CommonMethod { * @since 20 */ enableAutoSpacing(enabled: Optional): TextAttribute; + + /** + * Set text transition. + * + * @param { Optional } transition - The transition of text. + * @returns { TextAttribute } returns the instance of the TextAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + contentTransition(transition: Optional): TextAttribute; } /** diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 219165ceb2..3a06c41ef1 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -1666,15 +1666,122 @@ declare class ColorShaderStyle extends ShaderStyle { color: ResourceColor; } +/** + * Defines the text content transition class. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare class ContentTransition {} + +/** + * Defines the numeric text content transition class. + * + * @extends ContentTransition + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare class NumericTextTransition extends ContentTransition { /** - * Defines the line spacing options. - * @interface LineSpacingOptions + * constructor. + * + * @param { NumericTextTransitionOptions } [options] - The options of numeric text transition. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + constructor(options?: NumericTextTransitionOptions); + + /** + * The flip direction of numeric text transition. + * + * @type { ?FlipDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + flipDirection?: FlipDirection; + + /** + * Define whether enable blur effect. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enableBlur?: boolean; +} + +/** + * The options of numeric text transition. + * + * @interface NumericTextTransitionOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare interface NumericTextTransitionOptions { + /** + * Define the flip direction of numeric text transition. + * + * @type { ?FlipDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + flipDirection?: FlipDirection; + + /** + * Define whether enable blur effect. + * + * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice * @since 20 */ - declare interface LineSpacingOptions { + enableBlur?: boolean; +} + +/** + * Defines the flip direction of numeric text transition. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare enum FlipDirection { + /** + * The flip direction is down. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + DOWN = 0, + + /** + * The flip direction is up. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + UP = 1, +} + +/** + * Defines the line spacing options. + * @interface LineSpacingOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface LineSpacingOptions { /** * Used to set whether it will only take effect between lines. * -- Gitee