From 56eb3aedab3f9f26fc1794a20485f8e03dc846b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E5=93=A5?= Date: Thu, 3 Aug 2023 08:20:37 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 卡哥 --- .../reference/arkui-ts/ts-basic-components-text.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8127aea169..31ae79e889 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 @@ -41,7 +41,7 @@ Text(content?: string | Resource) | maxFontSize | number \| string \| [Resource](ts-types.md#resource) | 设置文本最大显示字号。
需配合minFontSize以及maxline或布局大小限制使用,单独设置不生效。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。
默认值:TextCase.Normal
从API version 9开始,该接口支持在ArkTS卡片中使用。| | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 组件支持设置文本是否可复制粘贴。
默认值:CopyOptions.None
该接口支持在ArkTS卡片中使用。
**说明:**
设置copyOptions为CopyOptions.InApp或者CopyOptions.LocalDevice,长按文本,会弹出文本选择菜单,可选中文本并进行复制、全选操作。 | -| draggabl | boolean | 设置选中文本拖拽效果。
不能和[onDragStart](ts-universal-events-drag-drop.md)事件同时使用;
需配合copyOption一起使用,设置copyOptions为CopyOptions.InApp或者CopyOptions.LocalDevice,并且dragable设置为true时,支持对选中文本的拖拽以及选中内容复制到输入框。
默认值:false
**说明:**
从 API version 9 开始支持。 | +| draggable | boolean | 设置选中文本拖拽效果。
不能和[onDragStart](ts-universal-events-drag-drop.md)事件同时使用;
需配合copyOption一起使用,设置copyOptions为CopyOptions.InApp或者CopyOptions.LocalDevice,并且dragable设置为true时,支持对选中文本的拖拽以及选中内容复制到输入框。
默认值:false
**说明:**
从 API version 9 开始支持。 | | textShadow10+ | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明) | 设置文字阴影效果。 | | heightAdaptivePolicy10+ | [TextHeightAdaptivePolicy](ts-appendix-enums.md#textheightadaptivepolicy10) | 设置文本自适应高度的方式。
默认值:TextHeightAdaptivePolicy.MAX_LINES_FIRST。
**说明:**
当设置为TextHeightAdaptivePolicy.MAX_LINES_FIRST时,优先使用`maxLines`属性来调整文本高度。如果使用`maxLines`属性的布局大小超过了布局约束,则尝试在`minFontSize`和`maxFontSize`的范围内缩小字体以显示更多文本。
当设置为TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST时,优先使用`minFontSize`属性来调整文本高度。如果使用`minFontSize`属性可以将文本布局在一行中,则尝试在`minFontSize`和`maxFontSize`的范围内增大字体并使用最大可能的字体大小。
当设置为TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST时,优先使用布局约束来调整文本高度。如果布局大小超过布局约束,则尝试在`minFontSize`和`maxFontSize`的范围内缩小字体以满足布局约束。如果将字体大小缩小到`minFontSize`后,布局大小仍然超过布局约束,则删除超过布局约束的行。| | textIndent10+ | number \| string | 设置首行文本缩进,默认值0。 | -- GitLab