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

!5087 【OpenHarmony开源贡献者计划2022】ts api相关格式及表达问题

Merge pull request !5087 from king_he/0608-2
# TextPicker
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
......@@ -25,10 +25,10 @@ TextPicker(value: {range: string[], selected?: number})
Creates a text picker based on the selection range specified by **range**.
- Parameter
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| range | string[] | Yes | - | Data selection range of the picker. |
| selected | number | No | First element | Index value of the selected item in the array. |
| selected | number | No | - | Index value of the selected item in the array. By default, the first element is selected. |
## Attributes
......
# TextTimer
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
......@@ -23,10 +23,10 @@ None
TextTimer(options: { isCountDown?: boolean, count?: number, controller?: TextTimerController })
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| isCountDown | boolean | No | false | Whether to count down. |
| count | number | No | 60000 | Countdown time, in milliseconds. This parameter is valid only when **isCountDown** is set to **true**.<br/>- If the value of **count** is less than or equal to 0, the default value is used.<br/>- If the value of **count** is greater than 0, it is used. |
| count | number | No | 60000 | Countdown time, in milliseconds. This parameter is valid only when **isCountDown** is set to **true**.<br/>- If the specified value is less than or equal to 0, the default value is used.<br/>- If the specified value is greater than 0, the value is used. |
| controller | [TextTimerController](#texttimercontroller) | No | null | **&lt;TextTimer&gt;** controller. |
## Attributes
......
# TimePicker
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
......
# Toggle
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
......@@ -20,14 +20,14 @@ None
Toggle(options: { type: ToggleType, isOn?: boolean })
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| type | ToggleType | Yes | - | Type of the toggle. |
| isOn | boolean | No | false | Initial state of the toggle.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>> If **isOn** is not set during component creation, the selected state can be retained during component reuse. If **isOn** is set, the selected state needs to be retained during component reuse after the selected state is recorded using an event method. |
| isOn | boolean | No | false | Initial state of the toggle.<br/>**NOTE**<br/>If **isOn** is not set during component creation, the selected state can be retained during component reuse. If **isOn** is set, the selected state needs to be retained during component reuse after the selected state is recorded using an event method. |
- ToggleType enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| Checkbox | A checkbox is provided. The text setting of the child component does not take effect. If the text setting is required, you can place the **&lt;Text&gt;** component and the current component in the layout component. |
| Button | A button is provided. If the text setting is available, the corresponding text content is displayed inside the button. |
......@@ -36,15 +36,15 @@ Toggle(options: { type: ToggleType, isOn?: boolean })
## Attributes
| Name | Type | Default Value | Description |
| Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- |
| selectedColor | Color | - | Background color of the toggle when it is enabled. |
| switchPointColor | Color | - | Color of the circular slider of the **Switch** type.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>> This attribute is valid only when type is set to **ToggleType.Switch**. |
| switchPointColor | Color | - | Color of the circular slider of the **Switch** type.<br/>**NOTE**<br/>This attribute is valid only when type is set to **ToggleType.Switch**. |
## Events
| Name | Description |
| Name | Description |
| -------- | -------- |
| onChange(callback: (isOn: boolean) =&gt; void) | Triggered when the switch status changes. |
......
......@@ -491,7 +491,7 @@ getCallingBundle(): Promise\<string>
| 类型 | 说明 |
| --------------- | ------------------------- |
| Promise\<string> | 调用ability的包名称 |
| Promise\<string> | 调用ability的包名称 |
**示例:**
......@@ -544,7 +544,7 @@ getCacheDir(): Promise\<string>
| 类型 | 说明 |
| --------------- | ------------------------- |
| Promise\<string> | 获取该应用程序的内部存储目录 |
| Promise\<string> | 获取该应用程序的内部存储目录 |
**示例:**
......@@ -758,7 +758,7 @@ getHapModuleInfo(): Promise\<HapModuleInfo>
| 类型 | 说明 |
| --------------- | ------------------------- |
| Promise\<[HapModuleInfo](#hapmoduleinfo)> | Promise形式返回应用的ModuleInfo对象。 |
| Promise\<[HapModuleInfo](#hapmoduleinfo)> | 返回应用的ModuleInfo对象。 |
**示例:**
......@@ -834,7 +834,7 @@ getAbilityInfo(callback: AsyncCallback\<AbilityInfo>): void
| 名称 | 类型 | 必填 | 描述 |
| -------- | ---------------------- | ---- | ------------------------- |
| callback | AsyncCallback\<[AbilityInfo](#abilityInfo)> | 是 |回调函数,可以在回调函数中处理接口返回值,返回当前归属Ability详细信息。|
| callback | AsyncCallback\<[AbilityInfo](#abilityInfo)> | 是 | 回调函数,可以在回调函数中处理接口返回值,返回当前归属Ability详细信息。|
**示例:**
......@@ -886,7 +886,7 @@ getApplicationContext(): Context
| 类型 | 说明 |
| --------- |------ |
| Context |返回应用上下文信息。 |
| Context | 返回应用上下文信息。 |
**示例:**
......@@ -920,27 +920,27 @@ Hap模块信息
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------ | ------ | ------ | ------ | ------ |
| name | string | 是 | 否 | 模块名称 |
| description | string | 是 | 否 | 模块描述信息 |
| descriptionId | number | 是 | 否 | 描述信息ID |
| icon | string | 是 | 否 | 模块图标 |
| label | string | 是 | 否 | 模块标签 |
| labelId | number | 是 | 否 | 模块标签ID |
| iconId | number | 是 | 否 | 模块图标ID |
| backgroundImg | string | 是 | 否 | 模块背景图片 |
| supportedModes | number | 是 | 否 | 模块支持的模式 |
| reqCapabilities | Array<string> | 是 | 否 | 模块运行需要的能力 |
| deviceTypes | Array<string> | 是 | 否 | 支持运行的设备类型 |
| abilityInfo | Array<AbilityInfo> | 是 | 否 | Ability信息 |
| moduleName | string | 是 | 否 | 模块名 |
| mainAbilityName | string | 是 | 否 | 入口Ability名称 |
| installationFree | boolean | 是 | 否 | 是否支持免安装 |
| mainElementName | string | 是 | 否 | 入口ability信息 |
| name | string | 是 | 否 | 模块名称 |
| description | string | 是 | 否 | 模块描述信息 |
| descriptionId | number | 是 | 否 | 描述信息ID |
| icon | string | 是 | 否 | 模块图标 |
| label | string | 是 | 否 | 模块标签 |
| labelId | number | 是 | 否 | 模块标签ID |
| iconId | number | 是 | 否 | 模块图标ID |
| backgroundImg | string | 是 | 否 | 模块背景图片 |
| supportedModes | number | 是 | 否 | 模块支持的模式 |
| reqCapabilities | Array<string> | 是 | 否 | 模块运行需要的能力 |
| deviceTypes | Array<string> | 是 | 否 | 支持运行的设备类型 |
| abilityInfo | Array<AbilityInfo> | 是 | 否 | Ability信息 |
| moduleName | string | 是 | 否 | 模块名 |
| mainAbilityName | string | 是 | 否 | 入口Ability名称 |
| installationFree | boolean | 是 | 否 | 是否支持免安装 |
| mainElementName | string | 是 | 否 | 入口ability信息 |
## AppVersionInfo<sup>7+</sup>
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------ | ------ | ------| ------ | ------ |
| appName | string | 是 | 否 | 模块名称 |
| versionCode | number | 是 | 否 | 模块描述信息 |
| versionName | string | 是 | 否 | 描述信息ID |
| appName | string | 是 | 否 | 模块名称 |
| versionCode | number | 是 | 否 | 模块描述信息 |
| versionName | string | 是 | 否 | 描述信息ID |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册