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

!20279 19801挑单到3.2release

Merge pull request !20279 from 田雨/rel0629
...@@ -12,7 +12,7 @@ AppStorage是应用全局的UI状态存储,是和应用的进程绑定的, ...@@ -12,7 +12,7 @@ AppStorage是应用全局的UI状态存储,是和应用的进程绑定的,
## 概述 ## 概述
AppStorage是LocalStorage是在应用启动的时候会被创建的单例。它的目的是为了提供应用状态数据的中心存储,这些状态数据在应用级别都是可访问的。AppStorage将在应用运行过程保留其属性。属性通过唯一的键字符串值访问。 AppStorage是在应用启动的时候会被创建的单例。它的目的是为了提供应用状态数据的中心存储,这些状态数据在应用级别都是可访问的。AppStorage将在应用运行过程保留其属性。属性通过唯一的键字符串值访问。
AppStorage可以和UI组件同步,且可以在应用业务逻辑中被访问。 AppStorage可以和UI组件同步,且可以在应用业务逻辑中被访问。
...@@ -199,5 +199,6 @@ struct CompA { ...@@ -199,5 +199,6 @@ struct CompA {
AppStorage与[PersistentStorage](arkts-persiststorage.md)以及[Environment](arkts-environment.md)配合使用时,需要注意以下几点: AppStorage与[PersistentStorage](arkts-persiststorage.md)以及[Environment](arkts-environment.md)配合使用时,需要注意以下几点:
- 在AppStorage中创建属性后,调用PersistentStorage.PersistProp()接口时,会使用在AppStorage中已经存在的值,并覆盖PersistentStorage中的同名属性,所以建议要使用相反的调用顺序,反例可见[在PersistentStorage之前访问AppStorage中的属性](arkts-persiststorage.md#在persistentstorage之前访问appstorage中的属性) - 在AppStorage中创建属性后,调用PersistentStorage.PersistProp()接口时,会使用在AppStorage中已经存在的值,并覆盖PersistentStorage中的同名属性,所以建议要使用相反的调用顺序,反例可见[在PersistentStorage之前访问AppStorage中的属性](arkts-persiststorage.md#在persistentstorage之前访问appstorage中的属性)
- 如果在AppStorage中已经创建属性后,再调用Environment.EnvProp()创建同名的属性,会调用失败。因为AppStorage已经有同名属性,Environment环境变量不会再写入AppStorage中,所以建议AppStorage中属性不要使用Environment预置环境变量名。 - 如果在AppStorage中已经创建属性后,再调用Environment.EnvProp()创建同名的属性,会调用失败。因为AppStorage已经有同名属性,Environment环境变量不会再写入AppStorage中,所以建议AppStorage中属性不要使用Environment预置环境变量名。
<!--no_check-->
\ No newline at end of file
...@@ -37,17 +37,19 @@ create(options: AnimatorOptions): AnimatorResult ...@@ -37,17 +37,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
...@@ -80,7 +82,7 @@ reset(options: AnimatorOptions): void ...@@ -80,7 +82,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,
...@@ -513,7 +515,7 @@ createAnimator(options: AnimatorOptions): AnimatorResult ...@@ -513,7 +515,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,7 +40,7 @@ Text(content?: string | Resource) ...@@ -40,7 +40,7 @@ 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,长按文本,会弹出文本选择菜单,可选中文本并进行复制、全选操作。 |
> **说明:** > **说明:**
> >
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册