未验证 提交 21ee74e7 编写于 作者: O openharmony_ci 提交者: Gitee

!19801 文档整改

Merge pull request !19801 from 田雨/master
...@@ -12,7 +12,7 @@ AppStorage是应用全局的UI状态存储,是和应用的进程绑定的, ...@@ -12,7 +12,7 @@ AppStorage是应用全局的UI状态存储,是和应用的进程绑定的,
## 概述 ## 概述
AppStorage是LocalStorage是在应用启动的时候会被创建的单例。它的目的是为了提供应用状态数据的中心存储,这些状态数据在应用级别都是可访问的。AppStorage将在应用运行过程保留其属性。属性通过唯一的键字符串值访问。 AppStorage是在应用启动的时候会被创建的单例。它的目的是为了提供应用状态数据的中心存储,这些状态数据在应用级别都是可访问的。AppStorage将在应用运行过程保留其属性。属性通过唯一的键字符串值访问。
AppStorage可以和UI组件同步,且可以在应用业务逻辑中被访问。 AppStorage可以和UI组件同步,且可以在应用业务逻辑中被访问。
......
...@@ -40,17 +40,19 @@ create(options: AnimatorOptions): AnimatorResult ...@@ -40,17 +40,19 @@ create(options: AnimatorOptions): AnimatorResult
**示例:** **示例:**
```js ```js
let options = { import animator, { AnimatorOptions } from '@ohos.animator';
duration: 1500,
easing: "friction", let options: AnimatorOptions = { // xxx.js文件中不需要强调显式类型AnimatorOptions
delay: 0, duration: 1500,
fill: "forwards", easing: "friction",
direction: "normal", delay: 0,
iterations: 3, fill: "forwards",
begin: 200.0, direction: "normal",
end: 400.0 iterations: 3,
}; begin: 200.0,
animator.create(options); end: 400.0
};
animator.create(options);
``` ```
## AnimatorResult ## AnimatorResult
...@@ -83,7 +85,7 @@ reset(options: AnimatorOptions): void ...@@ -83,7 +85,7 @@ reset(options: AnimatorOptions): void
**示例:** **示例:**
```js ```js
let options = { let options: AnimatorOptions = { // xxx.js文件中不需要强调显式类型AnimatorOptions
duration: 1500, duration: 1500,
easing: "friction", easing: "friction",
delay: 0, delay: 0,
...@@ -516,7 +518,7 @@ createAnimator(options: AnimatorOptions): AnimatorResult ...@@ -516,7 +518,7 @@ createAnimator(options: AnimatorOptions): AnimatorResult
**示例:** **示例:**
```js ```js
let options = { let options: AnimatorOptions = { // xxx.js文件中不需要强调显式类型AnimatorOptions
duration: 1500, duration: 1500,
easing: "friction", easing: "friction",
delay: 0, delay: 0,
......
...@@ -40,8 +40,8 @@ Text(content?: string | Resource) ...@@ -40,8 +40,8 @@ Text(content?: string | Resource)
| minFontSize | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 设置文本最小显示字号。<br/>需配合maxFontSize以及maxline或布局大小限制使用,单独设置不生效。 <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 | | minFontSize | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 设置文本最小显示字号。<br/>需配合maxFontSize以及maxline或布局大小限制使用,单独设置不生效。 <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 |
| maxFontSize | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 设置文本最大显示字号。<br/>需配合minFontSize以及maxline或布局大小限制使用,单独设置不生效。 <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 | | maxFontSize | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 设置文本最大显示字号。<br/>需配合minFontSize以及maxline或布局大小限制使用,单独设置不生效。 <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 |
| textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。<br />默认值:TextCase.Normal <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。| | textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。<br />默认值:TextCase.Normal <br/>从API version 9开始,该接口支持在ArkTS卡片中使用。|
| copyOption<sup>9+</sup> | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 组件支持设置文本是否可复制粘贴。<br />默认值:CopyOptions.None <br/>该接口支持在ArkTS卡片中使用。 | | copyOption<sup>9+</sup> | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 组件支持设置文本是否可复制粘贴。<br />默认值:CopyOptions.None <br/>该接口支持在ArkTS卡片中使用。<br/>**说明:** <br/>设置copyOptions为CopyOptions.InApp或者CopyOptions.LocalDevice,长按文本,会弹出文本选择菜单,可选中文本并进行复制、全选操作。 |
| draggable<sup>(deprecated)</sup> | boolean | 设置选中文本拖拽效果。<br/>不能和[onDragStart](ts-universal-events-drag-drop.md)事件同时使用;<br/>需配合copyOption一起使用,支持对选中文本的拖拽以及选中内容复制到输入框。<br/>默认值:false <br />**说明:**<br />从 API version 9 开始支持,从 API version 10 开始废弃,建议使用通用属性[draggable](ts-universal-events-drag-drop.md)替代。| | draggable<sup>(deprecated)</sup> | boolean | 设置选中文本拖拽效果。<br/>不能和[onDragStart](ts-universal-events-drag-drop.md)事件同时使用;<br/>需配合copyOption一起使用,设置copyOptions为CopyOptions.InApp或者CopyOptions.LocalDevice,并且dragable设置为true时,支持对选中文本的拖拽以及选中内容复制到输入框。<br/>默认值:false <br />**说明:**<br />从 API version 9 开始支持,从 API version 10 开始废弃,建议使用通用属性[draggable](ts-universal-events-drag-drop.md)替代。 |
| textShadow<sup>10+</sup> | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明) | 设置文字阴影效果。 | | textShadow<sup>10+</sup> | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明) | 设置文字阴影效果。 |
| heightAdaptivePolicy<sup>10+</sup> | [TextHeightAdaptivePolicy](ts-appendix-enums.md#textheightadaptivepolicy10) | 设置文本自适应高度的方式。<br/>默认值:TextHeightAdaptivePolicy.MAX_LINES_FIRST。<br/>**说明:**<br/>当设置为TextHeightAdaptivePolicy.MAX_LINES_FIRST时,优先使用`maxLines`属性来调整文本高度。如果使用`maxLines`属性的布局大小超过了布局约束,则尝试在`minFontSize``maxFontSize`的范围内缩小字体以显示更多文本。<br/>当设置为TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST时,优先使用`minFontSize`属性来调整文本高度。如果使用`minFontSize`属性可以将文本布局在一行中,则尝试在`minFontSize``maxFontSize`的范围内增大字体并使用最大可能的字体大小。<br/>当设置为TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST时,优先使用布局约束来调整文本高度。如果布局大小超过布局约束,则尝试在`minFontSize``maxFontSize`的范围内缩小字体以满足布局约束。如果将字体大小缩小到`minFontSize`后,布局大小仍然超过布局约束,则删除超过布局约束的行。| | heightAdaptivePolicy<sup>10+</sup> | [TextHeightAdaptivePolicy](ts-appendix-enums.md#textheightadaptivepolicy10) | 设置文本自适应高度的方式。<br/>默认值:TextHeightAdaptivePolicy.MAX_LINES_FIRST。<br/>**说明:**<br/>当设置为TextHeightAdaptivePolicy.MAX_LINES_FIRST时,优先使用`maxLines`属性来调整文本高度。如果使用`maxLines`属性的布局大小超过了布局约束,则尝试在`minFontSize``maxFontSize`的范围内缩小字体以显示更多文本。<br/>当设置为TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST时,优先使用`minFontSize`属性来调整文本高度。如果使用`minFontSize`属性可以将文本布局在一行中,则尝试在`minFontSize``maxFontSize`的范围内增大字体并使用最大可能的字体大小。<br/>当设置为TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST时,优先使用布局约束来调整文本高度。如果布局大小超过布局约束,则尝试在`minFontSize``maxFontSize`的范围内缩小字体以满足布局约束。如果将字体大小缩小到`minFontSize`后,布局大小仍然超过布局约束,则删除超过布局约束的行。|
| textIndent<sup>10+</sup> | number&nbsp;\|&nbsp;string | 设置首行文本缩进,默认值0。 | | textIndent<sup>10+</sup> | number&nbsp;\|&nbsp;string | 设置首行文本缩进,默认值0。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册