diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 2b0b4ee1443d53316ff5a937caff9141bab13775..7f498aaccebcbe7bd88b3a2158b2a49fd1d0e737 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -749,6 +749,19 @@ declare class TextAttribute extends CommonMethod { */ textVerticalAlign(textVerticalAlign: Optional): TextAttribute; + + /** + * Set the vertical align of the whole text content. + * + * @param { Optional } textContentAlign - The default value is TOP. + * @returns { TextAttribute } returns the instance of the TextAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + textContentAlign(textContentAlign: Optional): TextAttribute; + /** * Called when the vertical center mode of the font is set. * diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index d19c84bd3f6528b541b169e5ac776910b2330aa4..88805fc804b45977556b341f6aca54172008386d 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -2313,6 +2313,47 @@ declare enum TextVerticalAlign { TOP = 3, } +/** + * Alignment of text. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ +declare enum TextContentAlign { + /** + * Top the text. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + TOP = 0, + + /** + * Center alignment. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + CENTER = 1, + + /** + * Bottom alignment. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + BOTTOM = 2 +} + /** * Defines the input method client. *