提交 33a73451 编写于 作者: H HelloCrease

update docs

Signed-off-by: NHelloCrease <lian15@huawei.com>
上级 ecfff8ff
...@@ -16,31 +16,31 @@ Refresh\(value: \{ refreshing: boolean, offset?: number | string , friction?: n ...@@ -16,31 +16,31 @@ Refresh\(value: \{ refreshing: boolean, offset?: number | string , friction?: n
**Parameters** **Parameters**
| Name| Value Type| Mandatory| Description| | Name | Value Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | ---------- | ---------------- | --------- | ---------------------------------------- |
| refreshing | boolean | Yes| Whether the current component is being refreshed.<br>This parameter can be used with [$$](../../ui/ts-syntactic-sugar.md) for two-way binding of variables.| | refreshing | boolean | Yes | Whether the current component is being refreshed.<br>This parameter can be used with $$ for two-way binding of variables. |
| offset | string \| number | No| Distance to the top of the parent component from the **<Refresh\>** component that comes to rest after a successful pull-down gesture.<br>Default value: **16**, in vp| | offset | string \| number | No | Distance to the top of the parent component from the **<Refresh\>** component that comes to rest after a successful pull-down gesture.<br>Default value: **16**, in vp |
| friction | number \| string | No| Coefficient of friction, which indicates the **<Refresh\>** component's sensitivity to the pull-down gesture. The value ranges from 0 to 100.<br>Default value: **62**<br>- **0** indicates that the **\<Refresh>** component is not sensitive to the pull-down gesture.<br>- **100** indicates that the **\<Refresh>** component is highly sensitive to the pull-down gesture.<br>- A larger value indicates a more sensitive response of the **\<Refresh>** component to the pull-down gesture.| | friction | number \| string | No | Coefficient of friction, which indicates the **<Refresh\>** component's sensitivity to the pull-down gesture. The value ranges from 0 to 100.<br>Default value: **62**<br>- **0** indicates that the **\<Refresh>** component is not sensitive to the pull-down gesture.<br>- **100** indicates that the **\<Refresh>** component is highly sensitive to the pull-down gesture.<br>- A larger value indicates a more sensitive response of the **\<Refresh>** component to the pull-down gesture. |
## Events ## Events
| Name| Description| | Name | Description |
| -------- | -------- | | ---------------------------------------- | ---------------------------------------- |
| onStateChange(callback: (state: RefreshStatus) => void)| Triggered when the refresh status changes.<br>- **state**: refresh status.| | onStateChange(callback: (state: RefreshStatus) => void) | Triggered when the refresh status changes.<br>- **state**: refresh status. |
| onRefreshing(callback: () => void)| Triggered when the component enters the refresh state.| | onRefreshing(callback: () => void) | Triggered when the component enters the refresh state. |
## RefreshStatus enums ## RefreshStatus enums
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | ---------------------------------------- |
| Inactive | The component is not pulled down. This is the default value.| | Inactive | The component is not pulled down. This is the default value. |
| Drag | The component is being pulled down, but the pulled distance is shorter than the minimum length required to trigger the refresh.| | Drag | The component is being pulled down, but the pulled distance is shorter than the minimum length required to trigger the refresh. |
| OverDrag | The component is being pulled down, and the pulled distance exceeds the minimum length required to trigger the refresh.| | OverDrag | The component is being pulled down, and the pulled distance exceeds the minimum length required to trigger the refresh. |
| Refresh | The pull-down ends, and the component rebounds to the minimum length required to trigger the refresh and enters the refresh state.| | Refresh | The pull-down ends, and the component rebounds to the minimum length required to trigger the refresh and enters the refresh state. |
| Done | The refresh is complete, and the component returns to the initial state (top).| | Done | The refresh is complete, and the component returns to the initial state (top). |
## Example ## Example
......
...@@ -17,22 +17,22 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () =&gt; void, aut ...@@ -17,22 +17,22 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () =&gt; void, aut
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------------------- | ---------------------------------------- | ------------------------- | ---------------------- | | ---------------------- | ---------------------------------------- | --------- | ---------------------------------------- |
| builder | [CustomDialog](../../ui/ts-component-based-customdialog.md) | Yes | Constructor of the custom dialog box content. | | builder | CustomDialog | Yes | Constructor of the custom dialog box content. |
| cancel | () =&gt; void | No | Callback invoked when the dialog box is closed after the overlay exits. | | cancel | () =&gt; void | No | Callback invoked when the dialog box is closed after the overlay exits. |
| autoCancel | boolean | No | Whether to allow users to click the overlay to exit.<br>Default value: **true** | | autoCancel | boolean | No | Whether to allow users to click the overlay to exit.<br>Default value: **true** |
| alignment | [DialogAlignment](#dialogalignment) | No | Alignment mode of the dialog box in the vertical direction.<br>Default value: **DialogAlignment.Default** | | alignment | [DialogAlignment](#dialogalignment) | No | Alignment mode of the dialog box in the vertical direction.<br>Default value: **DialogAlignment.Default** |
| offset | {<br>dx: Length \| [Resource](ts-types.md#resource),<br>dy: Length \| [Resource](ts-types.md#resource)<br>} | No | Offset of the dialog box relative to the alignment position.| | offset | {<br>dx: Length \| [Resource](ts-types.md#resource),<br>dy: Length \| [Resource](ts-types.md#resource)<br>} | No | Offset of the dialog box relative to the alignment position. |
| customStyle | boolean | No | Whether to use a custom style for the dialog box.<br>Default value: **false** | | customStyle | boolean | No | Whether to use a custom style for the dialog box.<br>Default value: **false** |
| gridCount<sup>8+</sup> | number | No | Number of grid columns occupied by the dialog box. | | gridCount<sup>8+</sup> | number | No | Number of grid columns occupied by the dialog box. |
## DialogAlignment ## DialogAlignment
| Name | Description | | Name | Description |
| ------------------------ | ------- | | ------------------------ | -------------------------- |
| Top | Vertical top alignment.| | Top | Vertical top alignment. |
| Center | Vertical center alignment.| | Center | Vertical center alignment. |
| Bottom | Vertical bottom alignment.| | Bottom | Vertical bottom alignment. |
| Default | Default alignment. | | Default | Default alignment. |
| TopStart<sup>8+</sup> | Top left alignment. | | TopStart<sup>8+</sup> | Top left alignment. |
| TopEnd<sup>8+</sup> | Top right alignment. | | TopEnd<sup>8+</sup> | Top right alignment. |
......
...@@ -13,21 +13,21 @@ show(options?: TextPickerDialogOptions) ...@@ -13,21 +13,21 @@ show(options?: TextPickerDialogOptions)
Shows a text picker in the given settings. Shows a text picker in the given settings.
- TextPickerDialogOptions - TextPickerDialogOptions
| Name| Type| Mandatory| Default Value| Description| | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | ----------------------- | ---------------------------------------- | --------- | ------------- | ---------------------------------------- |
| range | string[] \| [Resource](../../ui/ts-types.md#resource)| Yes| - | Data selection range of the picker.| | range | string[] \| [Resource](ts-types.md#resource) | Yes | - | Data selection range of the picker. |
| selected | number | No| 0 | Index of the selected item in the range.| | selected | number | No | 0 | Index of the selected item in the range. |
| value | string | No | - | Value of the selected item. This parameter does not take effect when the **selected** parameter is set. If the value is not within the range, the first item in the range is used instead.| | value | string | No | - | Value of the selected item. This parameter does not take effect when the **selected** parameter is set. If the value is not within the range, the first item in the range is used instead. |
| defaultPickerItemHeight | number \| string | No| - | Default height of an item in the picker.| | defaultPickerItemHeight | number \| string | No | - | Default height of an item in the picker. |
| onAccept | (value: TextPickerResult) => void | No| - | Callback invoked when the OK button in the dialog box is clicked.| | onAccept | (value: TextPickerResult) => void | No | - | Callback invoked when the OK button in the dialog box is clicked. |
| onCancel | () => void | No| - | Callback invoked when the Cancel button in the dialog box is clicked.| | onCancel | () => void | No | - | Callback invoked when the Cancel button in the dialog box is clicked. |
| onChange | (value: TextPickerResult) => void | No| - | Callback invoked when the selected item in the picker changes.| | onChange | (value: TextPickerResult) => void | No | - | Callback invoked when the selected item in the picker changes. |
- TextPickerResult - TextPickerResult
| Name| Type| Description| | Name | Type | Description |
| -------- | -------- | -------- | | ----- | ------ | ---------------------------------------- |
| value | string | Value of the selected item.| | value | string | Value of the selected item. |
| index | number | Index of the selected item in the range.| | index | number | Index of the selected item in the range. |
## Example ## Example
......
...@@ -70,7 +70,7 @@ You can create resource group sub-directories (including element, media, animati ...@@ -70,7 +70,7 @@ You can create resource group sub-directories (including element, media, animati
**Table 3** Resource group sub-directories **Table 3** Resource group sub-directories
| Resource Group Sub-directory | Description | Resource File | | Resource Group Sub-directory | Description | Resource File |
| ---------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | ---------------------------- | ---------------------------------------- | ---------------------------------------- |
| element | Element resources. Each type of data is represented by a JSON file. The options are as follows:<br>- **boolean**: boolean data<br>- **color**: color data<br>- **float**: floating-point data<br>- **intarray**: array of integer<br>- **integer**: integer data<br>- **pattern**: pattern data<br>- **plural**: plural form data<br>- **strarray**: array of strings<br>- **string**: string data | It is recommended that files in the **element** sub-directory be named the same as the following files, each of which can contain only data of the same type:<br>- boolean.json<br>- color.json<br>- float.json<br>- intarray.json<br>- integer.json<br>- pattern.json<br>- plural.json<br>- strarray.json<br>- string.json | | element | Element resources. Each type of data is represented by a JSON file. The options are as follows:<br>- **boolean**: boolean data<br>- **color**: color data<br>- **float**: floating-point data<br>- **intarray**: array of integer<br>- **integer**: integer data<br>- **pattern**: pattern data<br>- **plural**: plural form data<br>- **strarray**: array of strings<br>- **string**: string data | It is recommended that files in the **element** sub-directory be named the same as the following files, each of which can contain only data of the same type:<br>- boolean.json<br>- color.json<br>- float.json<br>- intarray.json<br>- integer.json<br>- pattern.json<br>- plural.json<br>- strarray.json<br>- string.json |
| media | Media resources, including non-text files such as images, audios, and videos. | The file name can be customized, for example, **icon.png**. | | media | Media resources, including non-text files such as images, audios, and videos. | The file name can be customized, for example, **icon.png**. |
| profile | Other types of files, which are stored in their raw formats. | The file name can be customized. | | profile | Other types of files, which are stored in their raw formats. | The file name can be customized. |
...@@ -79,8 +79,8 @@ You can create resource group sub-directories (including element, media, animati ...@@ -79,8 +79,8 @@ You can create resource group sub-directories (including element, media, animati
**Table 4** Image resource types **Table 4** Image resource types
| Format| File Name Extension| | Format | File Name Extension |
| -------- | -------- | | ------ | ------------------- |
| JPEG | .jpg | | JPEG | .jpg |
| PNG | .png | | PNG | .png |
| GIF | .gif | | GIF | .gif |
...@@ -89,8 +89,8 @@ You can create resource group sub-directories (including element, media, animati ...@@ -89,8 +89,8 @@ You can create resource group sub-directories (including element, media, animati
| BMP | .bmp | | BMP | .bmp |
**Table 5** Audio and video resource types **Table 5** Audio and video resource types
| Format| File Name Extension| | Format | File Name Extension |
| -------- | -------- | | ------------------------------------ | ------------------- |
| H.263 | .3gp <br>.mp4 | | H.263 | .3gp <br>.mp4 |
| H.264 AVC <br> Baseline Profile (BP) | .3gp <br>.mp4 | | H.264 AVC <br> Baseline Profile (BP) | .3gp <br>.mp4 |
| MPEG-4 SP | .3gp | | MPEG-4 SP | .3gp |
......
...@@ -180,7 +180,7 @@ systemTime.getCurrentTime(false)和new Date().getTime()一样,都是返回1970 ...@@ -180,7 +180,7 @@ systemTime.getCurrentTime(false)和new Date().getTime()一样,都是返回1970
适用于:OpenHarmony SDK3.2.6.5, API9 Stage模型 适用于:OpenHarmony SDK3.2.6.5, API9 Stage模型
\@BuilderParam修饰的属性进行赋值时不带参数(如:content: this.specificParam),则此属性的类型需定义成无返回值的函数(如:\@BuilderParam content: () =&gt; void);若带参数(如:callContent: this.specificParam1("111")),则此属性的类型需定义成any(如:\@BuilderParam callContent: any;),具体用法请参考[BuilderParam](../ui/ts-component-based-builder.md) \@BuilderParam修饰的属性进行赋值时不带参数(如:content: this.specificParam),则此属性的类型需定义成无返回值的函数(如:\@BuilderParam content: () =&gt; void);若带参数(如:callContent: this.specificParam1("111")),则此属性的类型需定义成any(如:\@BuilderParam callContent: any;),具体用法请参考[BuilderParam](../quick-start/arkts-dynamic-ui-elememt-building.md#builderparam8)
## ArkTS如何把string转成byte数组 ## ArkTS如何把string转成byte数组
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | --------------------- |
| ohos.i18n | getSystemLanguage():string | 获取系统语言。 | | ohos.i18n | getSystemLanguage():string | 获取系统语言。 |
| ohos.i18n | getSystemRegion():string | 获取系统区域。 | | ohos.i18n | getSystemRegion():string | 获取系统区域。 |
| ohos.i18n | getSystemLocale():string | 获取系统Locale。 | | ohos.i18n | getSystemLocale():string | 获取系统Locale。 |
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | --------------------- |
| ohos.i18n | getCalendar(locale:string,type?:string):Calendar<sup>8+</sup> | 获取指定locale和type的日历对象。 | | ohos.i18n | getCalendar(locale:string,type?:string):Calendar<sup>8+</sup> | 获取指定locale和type的日历对象。 |
| ohos.i18n | setTime(date:Date): void<sup>8+</sup> | 设置日历对象内部的时间日期。 | | ohos.i18n | setTime(date:Date): void<sup>8+</sup> | 设置日历对象内部的时间日期。 |
| ohos.i18n | setTime(time:number): void<sup>8+</sup> | 设置日历对象内部的时间日期。 | | ohos.i18n | setTime(time:number): void<sup>8+</sup> | 设置日历对象内部的时间日期。 |
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | ----------------------- |
| ohos.i18n | constructor(country:string,options?:PhoneNumberFormatOptions)<sup>8+</sup> | 实例化PhoneNumberFormat对象。 | | ohos.i18n | constructor(country:string,options?:PhoneNumberFormatOptions)<sup>8+</sup> | 实例化PhoneNumberFormat对象。 |
| ohos.i18n | isValidNumber(number:string):boolean<sup>8+</sup> | 判断number是否是一个格式正确的电话号码。 | | ohos.i18n | isValidNumber(number:string):boolean<sup>8+</sup> | 判断number是否是一个格式正确的电话号码。 |
| ohos.i18n | format(number:string):string<sup>8+</sup> | 对number按照指定国家及风格进行格式化。 | | ohos.i18n | format(number:string):string<sup>8+</sup> | 对number按照指定国家及风格进行格式化。 |
...@@ -221,14 +221,14 @@ ...@@ -221,14 +221,14 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | --------------------------------------- |
| ohos.i18n | unitConvert(fromUnit:UnitInfo,toUnit:UnitInfo,value:number,locale:string,style?:string):string<sup>8+</sup> | 将fromUnit的单位转换为toUnit的单位,并根据区域与风格进行格式化。 | | ohos.i18n | unitConvert(fromUnit:UnitInfo,toUnit:UnitInfo,value:number,locale:string,style?:string):string<sup>8+</sup> | 将fromUnit的单位转换为toUnit的单位,并根据区域与风格进行格式化。 |
### 开发步骤 ### 开发步骤
1. 度量衡单位转换。 1. 度量衡单位转换。
调用[unitConvert](../reference/apis/js-apis-i18n.md#unitconvert8)方法实现度量衡单位转换,并进行格式化显示的功能。 调用[unitConvert](../reference/apis/js-apis-i18n.md#unitconvert9)方法实现度量衡单位转换,并进行格式化显示的功能。
```js ```js
var fromUnit = {unit: "cup", measureSystem: "US"}; var fromUnit = {unit: "cup", measureSystem: "US"};
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | ----------------------- |
| ohos.i18n | getInstance(locale?:string):IndexUtil<sup>8+</sup> | 实例化字母表索引对象。 | | ohos.i18n | getInstance(locale?:string):IndexUtil<sup>8+</sup> | 实例化字母表索引对象。 |
| ohos.i18n | getIndexList():Array&lt;string&gt;<sup>8+</sup> | 获取当前Locale的索引列表。 | | ohos.i18n | getIndexList():Array&lt;string&gt;<sup>8+</sup> | 获取当前Locale的索引列表。 |
| ohos.i18n | addLocale(locale:string): void<sup>8+</sup> | 将新的Locale对应的索引加入当前索引列表。 | | ohos.i18n | addLocale(locale:string): void<sup>8+</sup> | 将新的Locale对应的索引加入当前索引列表。 |
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
### 接口说明 ### 接口说明
| 模块 | 接口名称 | 描述 | | 模块 | 接口名称 | 描述 |
| -------- | -------- | -------- | | --------- | ---------------------------------------- | ------------------------------ |
| ohos.i18n | getLineInstance(locale:string):BreakIterator<sup>8+</sup> | 实例化断行对象。 | | ohos.i18n | getLineInstance(locale:string):BreakIterator<sup>8+</sup> | 实例化断行对象。 |
| ohos.i18n | setLineBreakText(text:string): void<sup>8+</sup> | 设置要处理的文本。 | | ohos.i18n | setLineBreakText(text:string): void<sup>8+</sup> | 设置要处理的文本。 |
| ohos.i18n | getLineBreakText():string<sup>8+</sup> | 获取要处理的文本。 | | ohos.i18n | getLineBreakText():string<sup>8+</sup> | 获取要处理的文本。 |
......
...@@ -30,7 +30,7 @@ matchMediaSync(condition: string): MediaQueryListener ...@@ -30,7 +30,7 @@ matchMediaSync(condition: string): MediaQueryListener
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | ---------------------------------------- | | --------- | ------ | ---- | ---------------------------------------- |
| condition | string | 是 | 媒体事件的匹配条件,具体可参考[媒体查询语法规则](../../ui/ui-ts-layout-mediaquery.md#媒体查询条件语法规则)。 | | condition | string | 是 | 媒体事件的匹配条件,具体可参考[媒体查询语法规则](../../ui/ui-ts-layout-mediaquery.md#语法规则)。 |
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
......
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件: 除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件:
| 名称 | 参数 | 描述 | | 名称 | 参数 | 描述 |
| -------------- | ---------------------------------------- | ------------------------- | | -------- | ---------------------------------------- | ------------------------- |
| complete(Rich) | {<br>&nbsp;width:width,<br>&nbsp;height:height<br>&nbsp;} | 图片成功加载时触发该回调,返回成功加载的图源尺寸。 | | complete | {<br>&nbsp;width:width,<br>&nbsp;height:height<br>&nbsp;} | 图片成功加载时触发该回调,返回成功加载的图源尺寸。 |
| error(Rich) | {<br>&nbsp;width:width,<br>&nbsp;height:height<br>&nbsp;} | 图片加载出现异常时触发该回调,异常时长宽为零。 | | error | {<br>&nbsp;width:width,<br>&nbsp;height:height<br>&nbsp;} | 图片加载出现异常时触发该回调,异常时长宽为零。 |
## 方法 ## 方法
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件: 除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件:
| 名称 | 参数 | 描述 | | 名称 | 参数 | 描述 |
| ------------ | ---- | ---------------------------------------- | | ------ | ---- | ---------------------------------------- |
| bounce(Rich) | - | 当文本滚动到末尾时触发该事件。 | | bounce | - | 当文本滚动到末尾时触发该事件。 |
| finish(Rich) | - | 当完成滚动次数时触发该事件。需要在&nbsp;loop&nbsp;属性值大于&nbsp;0&nbsp;时触发。 | | finish | - | 当完成滚动次数时触发该事件。需要在&nbsp;loop&nbsp;属性值大于&nbsp;0&nbsp;时触发。 |
| start(Rich) | - | 当文本滚动开始时触发该事件。 | | start | - | 当文本滚动开始时触发该事件。 |
## 方法 ## 方法
......
...@@ -34,15 +34,15 @@ ...@@ -34,15 +34,15 @@
除支持[通用样式](../arkui-js/js-components-common-styles.md)外,还支持如下样式: 除支持[通用样式](../arkui-js/js-components-common-styles.md)外,还支持如下样式:
| 名称 | 类型 | 默认值 | 必填 | 描述 | | 名称 | 类型 | 默认值 | 必填 | 描述 |
| ------------------- | -------------------------- | ---------- | ---- | ---------------------------------------- | | ------------- | -------------------------- | ---------- | ---- | ---------------------------------------- |
| texton-color(Rich) | &lt;color&gt; | \#000000 | 否 | 选中时显示的文本颜色,仅设置texton和textoff生效。 | | texton-color | &lt;color&gt; | \#000000 | 否 | 选中时显示的文本颜色,仅设置texton和textoff生效。 |
| textoff-color(Rich) | &lt;color&gt; | \#000000 | 否 | 未选中时显示的文本颜色,仅设置texton和textoff生效。 | | textoff-color | &lt;color&gt; | \#000000 | 否 | 未选中时显示的文本颜色,仅设置texton和textoff生效。 |
| text-padding(Rich) | number | 0px | 否 | texton/textoff中最长文本两侧距离滑块边界的距离。 | | text-padding | number | 0px | 否 | texton/textoff中最长文本两侧距离滑块边界的距离。 |
| font-size(Rich) | &lt;length&gt; | - | 否 | 文本尺寸,仅设置texton和textoff生效。 | | font-size | &lt;length&gt; | - | 否 | 文本尺寸,仅设置texton和textoff生效。 |
| allow-scale(Rich) | boolean | true | 否 | 文本尺寸是否跟随系统设置字体缩放尺寸进行放大缩小。<br/>如果在config描述文件中针对ability配置了fontSize的config-changes标签,则应用不会重启而直接生效。 | | allow-scale | boolean | true | 否 | 文本尺寸是否跟随系统设置字体缩放尺寸进行放大缩小。<br/>如果在config描述文件中针对ability配置了fontSize的config-changes标签,则应用不会重启而直接生效。 |
| font-style(Rich) | string | normal | 否 | 字体样式,仅设置texton和textoff生效。见text组件[font-style的样式属性](../arkui-js/js-components-basic-text.md#样式)。 | | font-style | string | normal | 否 | 字体样式,仅设置texton和textoff生效。见text组件[font-style的样式属性](../arkui-js/js-components-basic-text.md#样式)。 |
| font-weight(Rich) | number&nbsp;\|&nbsp;string | normal | 否 | 字体粗细,仅设置texton和textoff生效。见text组件的[font-weight的样式属性](../arkui-js/js-components-basic-text.md#样式)。 | | font-weight | number&nbsp;\|&nbsp;string | normal | 否 | 字体粗细,仅设置texton和textoff生效。见text组件的[font-weight的样式属性](../arkui-js/js-components-basic-text.md#样式)。 |
| font-family(Rich) | string | sans-serif | 否 | 字体列表,用逗号分隔,每个字体用字体名或者字体族名设置。列表中第一个系统中存在的或者通过[自定义字体](../arkui-js/js-components-common-customizing-font.md)指定的字体,会被选中作为文本的字体。仅设置texton和textoff生效。 | | font-family | string | sans-serif | 否 | 字体列表,用逗号分隔,每个字体用字体名或者字体族名设置。列表中第一个系统中存在的或者通过[自定义字体](../arkui-js/js-components-common-customizing-font.md)指定的字体,会被选中作为文本的字体。仅设置texton和textoff生效。 |
## 事件 ## 事件
......
...@@ -51,7 +51,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 ...@@ -51,7 +51,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业
**表1** 长时任务种类 **表1** 长时任务种类
| 后台模式 | 说明 | 通知栏显示提示 | 备注 | | 后台模式 | 说明 | 通知栏显示提示 | 备注 |
| -------- | -------- | -------- | -------- | | --------------------- | ------------------------- | ------------ | ------------------------- |
| dataTransfer | 通过网络/对端设备进行数据下载、备份、分享、传输等 | 正在运行数据传输任务 | - | | dataTransfer | 通过网络/对端设备进行数据下载、备份、分享、传输等 | 正在运行数据传输任务 | - |
| audioPlayback | 音频输出 | 正在运行音频播放任务 | - | | audioPlayback | 音频输出 | 正在运行音频播放任务 | - |
| audioRecording | 音频输入 | 正在运行录音任务 | - | | audioRecording | 音频输入 | 正在运行录音任务 | - |
...@@ -80,14 +80,14 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 ...@@ -80,14 +80,14 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业
- **执行频率**:系统会根据应用的活跃度对延迟任务做分级管控,限制延迟任务调度的执行频率。对于通过能效资源接口申请了WORK_SCHEDULER资源的应用,在资源的有效期内,它的延迟任务执行频率不受限制。 - **执行频率**:系统会根据应用的活跃度对延迟任务做分级管控,限制延迟任务调度的执行频率。对于通过能效资源接口申请了WORK_SCHEDULER资源的应用,在资源的有效期内,它的延迟任务执行频率不受限制。
| 应用分组 | 延迟任务执行频率约束 | | 应用分组 | 延迟任务执行频率约束 |
| --------------------|------------------------- | | ---------------------------------------- | ---------- |
| 活跃 | 最小间隔2小时 | | 活跃 | 最小间隔2小时 |
| 每日使用 | 最小间隔4小时 | | 每日使用 | 最小间隔4小时 |
| 经常使用 | 最小间隔24小时 | | 经常使用 | 最小间隔24小时 |
| 不经常使用 | 最小间隔48小时 | | 不经常使用 | 最小间隔48小时 |
| 受限分组 | 禁止 | | 受限分组 | 禁止 |
| 未使用分组 | 禁止 | | 未使用分组 | 禁止 |
| [能效资源豁免分组](../reference/apis/js-apis-backgroundTaskManager.md#resourcetype9) | 执行频率不受限制 | | [能效资源豁免分组](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#resourcetype) | 执行频率不受限制 |
- **WorkInfo设置参数约束** - **WorkInfo设置参数约束**
...@@ -112,7 +112,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 ...@@ -112,7 +112,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业
**表1** 能效资源种类 **表1** 能效资源种类
| 参数名 | 参数值 | 描述 | | 参数名 | 参数值 | 描述 |
| ----------------------- | ---- | --------------------- | | -------------- | ---- | ------------------- |
| CPU | 1 | CPU资源,申请后不被挂起 | | CPU | 1 | CPU资源,申请后不被挂起 |
| COMMON_EVENT | 2 | 公共事件,申请后挂起状态下不被代理掉 | | COMMON_EVENT | 2 | 公共事件,申请后挂起状态下不被代理掉 |
| TIMER | 4 | 计时器,申请后挂起状态下不被代理掉 | | TIMER | 4 | 计时器,申请后挂起状态下不被代理掉 |
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
**表1** 申请能效资源主要接口 **表1** 申请能效资源主要接口
| 接口名 | 描述 | | 接口名 | 描述 |
| ---------------------------------------- | ---------------------------------------- | | ---------------------------------------- | ---------- |
| applyEfficiencyResources(request: [EfficiencyResourcesRequest](../reference/apis/js-apis-backgroundTaskManager.md#efficiencyresourcesrequest9)): boolean | 申请能效资源。 | | applyEfficiencyResources(request: [EfficiencyResourcesRequest](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#efficiencyresourcesrequest)): boolean | 申请能效资源。 |
| resetAllEfficiencyResources():void | 释放申请的能效资源。 | | resetAllEfficiencyResources():void | 释放申请的能效资源。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册