Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
a8e4cae7
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a8e4cae7
编写于
9月 28, 2022
作者:
S
sienna1128
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
sienna1128
<
lixiaoyan45@huawei.com
>
上级
abc1f592
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
20 addition
and
2 deletion
+20
-2
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md
...cation-dev/reference/arkui-ts/ts-basic-components-text.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md
...n-dev/reference/arkui-ts/ts-basic-components-textclock.md
+19
-1
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md
浏览文件 @
a8e4cae7
...
@@ -29,7 +29,7 @@ Text(content?: string | Resource)
...
@@ -29,7 +29,7 @@ Text(content?: string | Resource)
| 名称 | 参数类型 | 描述 |
| 名称 | 参数类型 | 描述 |
| ----------------------- | ----------------------------------- | ------------------------------------------- |
| ----------------------- | ----------------------------------- | ------------------------------------------- |
| textAlign |
[
TextAlign
](
ts-appendix-enums.md#textalign
)
| 设置多行文本的文本对齐方式。
<br/>
默认值:TextAlign.Start |
| textAlign |
[
TextAlign
](
ts-appendix-enums.md#textalign
)
| 设置多行文本的文本对齐方式。
<br/>
默认值:TextAlign.Start |
| textOverflow | {overflow:
[
TextOverflow
](
ts-appendix-enums.md#textoverflow
)
} | 设置文本超长时的显示方式。
<br/>
默认值:
TextOverflow.Clip
<br/>
**说明:**
<br/>
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:
\u
200B。
<br
/>
需配合
`maxLines`
使用,单独设置不生效。 |
| textOverflow | {overflow:
[
TextOverflow
](
ts-appendix-enums.md#textoverflow
)
} | 设置文本超长时的显示方式。
<br/>
默认值:
{overflow:
TextOverflow.Clip}
<br/>
**说明:**
<br/>
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:
\u
200B。
<br
/>
需配合
`maxLines`
使用,单独设置不生效。 |
| maxLines | number | 设置文本的最大行数。
<br
/>
默认值:Infinity
<br/>
**说明:**
<br
/>
默认情况下,文本是自动折行的,如果指定此参数,则文本最多不会超过指定的行。如果有多余的文本,可以通过
`textOverflow`
来指定截断方式。 |
| maxLines | number | 设置文本的最大行数。
<br
/>
默认值:Infinity
<br/>
**说明:**
<br
/>
默认情况下,文本是自动折行的,如果指定此参数,则文本最多不会超过指定的行。如果有多余的文本,可以通过
`textOverflow`
来指定截断方式。 |
| lineHeight | string
\|
number
\|
[
Resource
](
ts-types.md#resource
)
| 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 |
| lineHeight | string
\|
number
\|
[
Resource
](
ts-types.md#resource
)
| 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 |
| decoration | {
<br/>
type:
[TextDecorationType](ts-appendix-enums.md#textdecorationtype),
<br/>
color?:
[
ResourceColor
](
ts-types.md#resourcecolor
)
<br/>
} | 设置文本装饰线样式及其颜色。
<br
/>
默认值:{
<br/>
type:
TextDecorationType.None,
<br/>
color:Color.Black
<br/>
} |
| decoration | {
<br/>
type:
[TextDecorationType](ts-appendix-enums.md#textdecorationtype),
<br/>
color?:
[
ResourceColor
](
ts-types.md#resourcecolor
)
<br/>
} | 设置文本装饰线样式及其颜色。
<br
/>
默认值:{
<br/>
type:
TextDecorationType.None,
<br/>
color:Color.Black
<br/>
} |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md
浏览文件 @
a8e4cae7
...
@@ -24,7 +24,25 @@ TextClock(options?: { timeZoneOffset?: number, controller?: TextClockController
...
@@ -24,7 +24,25 @@ TextClock(options?: { timeZoneOffset?: number, controller?: TextClockController
## TextClockController
## TextClockController
TextClock容器组件的控制器,可以将此对象绑定到TextClock组件,再通过它控制文本时钟的启动与停止。一个TextClock组件仅支持绑定一个控制器。
TextClock容器组件的控制器,可以将该控制器绑定到TextClock组件,通过它控制文本时钟的启动与停止。一个TextClock组件仅支持绑定一个控制器。
### 导入对象
```
ts
controller
:
TextClockController
=
new
TextClockController
()
```
### start
start()
启动文本时钟。
### stop
stop()
停止文本时钟。
## 属性
## 属性
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录