From bba57d7638450efef807f5d70572ee0390d9b6f1 Mon Sep 17 00:00:00 2001 From: zhoukechen Date: Sun, 15 Jun 2025 16:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E6=88=90paragraph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoukechen --- .../component/ets/styled_string.d.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/api/@internal/component/ets/styled_string.d.ts b/api/@internal/component/ets/styled_string.d.ts index a73cc49a83..0748b5a105 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -2072,6 +2072,31 @@ declare abstract class CustomSpan { invalidate(): void; } +declare class TextLayout { + /** + * Get layout info of the styled string. + * + * @param { StyledString } styledString + * @param { TextLayoutOptions } options + * @crossplatform + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static getParagraphs(styledString: StyledString, options: TextLayoutOptions): Array; +} + +declare interface TextLayoutOptions { + /** + * Text display area of width. + * + * @type { LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + constraintWidth : LengthMetrics +} + /** * Defines UserDataSpan. Used to store and obtain user data. * -- Gitee