From f027e597b5563914342483e544a8dc63500a1173 Mon Sep 17 00:00:00 2001 From: caocan <1532643766@qq.com> Date: Wed, 18 May 2022 19:29:09 +0800 Subject: [PATCH] add note to text Signed-off-by: caocan <1532643766@qq.com> Change-Id: I643438d0b0b0ea67aa240fd5dcf0dc0eaede67a3 --- .../reference/arkui-ts/ts-basic-components-text.md | 4 ++-- 1 file changed, 2 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 a1c1876981..98ba09c663 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 @@ -32,7 +32,7 @@ Text(content?: string) | 名称 | 参数类型 | 默认值 | 描述 | | -------- | -------- | -------- | -------- | | textAlign | TextAlign | TextAlign.Start | 设置多行文本的文本对齐方式。 | -| textOverflow | {overflow: TextOverflow} | {overflow: TextOverflow.Clip} | 设置文本超长时的显示方式。 | +| textOverflow | {overflow: TextOverflow} | {overflow: TextOverflow.Clip} | 设置文本超长时的显示方式。
**说明:**
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:\u200B。 | | maxLines | number | Infinity | 设置文本的最大行数。 | | lineHeight | Length | - | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | | decoration | {
type: TextDecorationType,
color?: Color
} | {
type: TextDecorationType.None,
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | @@ -91,7 +91,7 @@ struct TextExample1 { Text('This is the setting of textOverflow to Clip text content This is the setting of textOverflow to Clip text content.') .textOverflow({ overflow: TextOverflow.Clip }) .maxLines(1).fontSize(12).border({ width: 1 }).padding(10) - Text('This is set textOverflow to Ellipsis text content This is set textOverflow to Ellipsis text content.') + Text('This is set textOverflow to Ellipsis text content This is set textOverflow to Ellipsis text content.'.split('').join('\u200B')) .textOverflow({ overflow: TextOverflow.Ellipsis }) .maxLines(1).fontSize(12).border({ width: 1 }).padding(10) -- GitLab