From 0e5297297ca8e1e6e5699940645ed17e12943ce5 Mon Sep 17 00:00:00 2001 From: LiAn Date: Thu, 24 Aug 2023 09:15:57 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md. Signed-off-by: LiAn Signed-off-by: LiAn --- .../reference/arkui-ts/ts-basic-components-text.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md index 31ae79e889..315444a621 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -61,7 +61,7 @@ Text(content?: string | Resource) ## 示例 ### 示例1 -textAlign,textOverflow,maxLines,lineHeight使用示例。 + ```ts // xxx.ets @Entry @@ -144,7 +144,7 @@ struct TextExample1 { ![textExp1](figures/textExp1.png) ### 示例2 -decoration,baselineOffset,letterSpacing,textCase使用示例: + ```ts @Entry @Component @@ -262,6 +262,7 @@ struct TextExample { build() { Column({ space: 8 }) { Text('textShadow').fontSize(9).fontColor(0xCCCCCC).margin(15).width('90%') + // 设置文字阴影效果 Text('textShadow') .width('80%') .height(55) @@ -271,6 +272,7 @@ struct TextExample { .textShadow({ radius: 10, color: Color.Black, offsetX: 0, offsetY: 0 }) .borderWidth(1) Divider() + // 设置文本自适应高度的方式 Text('heightAdaptivePolicy').fontSize(9).fontColor(0xCCCCCC).margin(15).width('90%') Text('This is the text with the height adaptive policy set') .width('80%') @@ -301,6 +303,7 @@ struct TextExample { .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST) Divider() Text('marquee').fontSize(9).fontColor(0xCCCCCC).margin(15).width('90%') + // 设置文本超长时以跑马灯的方式展示 Text('This is the text with the text overflow set marquee') .width(300) .borderWidth(1) -- GitLab