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

!7093 翻译完成 6838:Button组件接口中的参数lable类型有误

Merge pull request !7093 from ester.zhou/TR-7055
# Button # Button
The **\<Button>** component can be used to create different types of buttons.
> **NOTE**<br> > **NOTE**
>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **&lt;Button&gt;** component represents a component that can trigger actions.
## Required Permissions ## Required Permissions
None None
...@@ -30,15 +29,15 @@ Supported ...@@ -30,15 +29,15 @@ Supported
| stateEffect | boolean | No | true | Whether to enable the state switchover effect when a button is pressed. When the state is set to **false**, the state switchover effect is disabled. | | stateEffect | boolean | No | true | Whether to enable the state switchover effect when a button is pressed. When the state is set to **false**, the state switchover effect is disabled. |
- Button(label?: string, options?: { type?: ButtonType, stateEffect?: boolean }) - Button(label?: [ResourceStr](../../ui/ts-types.md), options?: { type?: ButtonType, stateEffect?: boolean })
Creates a button component based on text content. In this case, the **&lt;Button&gt;** component cannot contain child components. Creates a button component based on text content. In this case, the **\<Button>** component cannot contain child components.
**Table 2** value parameters **Table 2** Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| label | string | No | - | Button text. | | label | [ResourceStr](../../ui/ts-types.md) | No | - | Button text. |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
...@@ -67,7 +66,8 @@ Supported ...@@ -67,7 +66,8 @@ Supported
## Example ## Example
``` ```ts
// xxx.ets
@Entry @Entry
@Component @Component
struct ButtonExample { struct ButtonExample {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册