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

!6544 翻译完成 6424

Merge pull request !6544 from ester.zhou/TR-6424
# Checkbox
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The **\<Checkbox>** component is used to enable or disable an option.
> **NOTE**
>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions
None
## Child Components
None
Not supported
## APIs
......@@ -30,7 +30,7 @@ Checkbox( name?: string, group?: string )
| Name | Type| Default Value| Description|
| ------------- | ------- | ------ | -------- |
| select | bool | false | Whether the check box is selected.|
| select | boolean | false | Whether the check box is selected.|
| selectedColor | Color | - | Color of the check box when it is selected.|
## Events
......@@ -41,7 +41,8 @@ Checkbox( name?: string, group?: string )
## Example
```
```ts
// xxx.ets
@Entry
@Component
struct CheckboxExample {
......
# CheckboxGroup
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The **\<CheckboxGroup>** component is used to select or deselect all check boxes in a group.
> **NOTE**
>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions
None
## Child Components
None
Not supported
## APIs
......@@ -27,19 +28,19 @@ Creates a check box group so that you can select or deselect all check boxes in
## Attributes
| Name| Type| Default Value| Description|
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| selectAll | bool | false | Whether to select all.|
| selectedColor | Color | - | Color of the selected check box.|
| selectAll | boolean | false | Whether to select all.|
| selectedColor | Color | - | Color of the selected check box.|
## Events
| Name| Description|
| Name| Description|
| -------- | -------- |
| onChange (callback: (names: Array&lt;string&gt;, status: SelectStatus) => void ) |Triggered when the selection status of the check box group or any check box wherein changes.<br>- **names**: names of all selected check boxes in the group.<br>- **status**: selection status.|
| onChange (callback: (names: Array&lt;string&gt;, status: SelectStatus) => void ) |Triggered when the selection status of the check box group or any check box wherein changes.<br>- **names**: names of all selected check boxes in the group.<br>- **status**: selection status.|
- SelectStatus enums
| Name | Description|
| Name | Description|
| ----- | -------------------- |
| All | All check boxes in the group are selected.|
| Part | Some check boxes in the group are selected.|
......@@ -48,7 +49,8 @@ Creates a check box group so that you can select or deselect all check boxes in
## Example
```
```ts
// xxx.ets
@Entry
@Component
struct CheckboxExample {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册