From 60a8aa76e6991947e2d9b84fb7c943420fcf53ee Mon Sep 17 00:00:00 2001 From: king_he <6384784@qq.com> Date: Thu, 2 Jun 2022 12:19:08 +0000 Subject: [PATCH] update en/application-dev/reference/arkui-ts/ts-basic-components-search.md. Signed-off-by: king_he <6384784@qq.com> --- .../arkui-ts/ts-basic-components-search.md | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-search.md b/en/application-dev/reference/arkui-ts/ts-basic-components-search.md index fbd02e43d8..4f0f3f4315 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-search.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-search.md @@ -1,6 +1,7 @@ # Search -> ![](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. +> **NOTE**
+> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. The **\** component provides an input area for users to search. @@ -18,32 +19,32 @@ Search(options?: { value?: string; placeholder?: string; icon?: string; controll - Parameters - | Name| Type| Mandatory| Default Value| Description| + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | value | string | No| - | Text input in the search text box.| - | placeholder | string | No | - | Text displayed when there is no input.| - | icon | string | No| - | Path to the search icon. By default, the system search icon is used. The supported icon formats are svg, jpg, and png.| - | controller | SearchController | No| - | Controller.| + | value | string | No| - | Text input in the search text box. | + | placeholder | string | No | - | Text displayed when there is no input. | + | icon | string | No| - | Path to the search icon. By default, the system search icon is used. The supported icon formats are svg, jpg, and png. | + | controller | SearchController | No| - | Controller. | ## Attributes -| Name| Type| Default Value| Description| +| Name | Type | Default Value | Description | | -------- | -------- | -------- | -------- | -| searchButton | string | –| Text on the search button located next to the search text box. By default, there is no search button.| -| placeholderColor | [ResourceColor](../../ui/ts-types.md) | - | Placeholder text color.| -| placeholderFont | [Font](../../ui/ts-types.md) | - | Placeholder text style.| -| textFont | [Font](../../ui/ts-types.md) | - | Text font for the search text box.| +| searchButton | string | –| Text on the search button located next to the search text box. By default, there is no search button. | +| placeholderColor | [ResourceColor](../../ui/ts-types.md) | - | Placeholder text color. | +| placeholderFont | [Font](../../ui/ts-types.md) | - | Placeholder text style. | +| textFont | [Font](../../ui/ts-types.md) | - | Text font for the search text box. | ## Events -| Name| Description| +| Name | Description | | -------- | -------- | -| onSubmit(callback: (value: string) => void) | Triggered when users click the search icon or the search button, or tap the search button on a soft keyboard.
-**value**: current text input.| -| onChange(callback: (value: string) => void) | Triggered when the input in the text box changes.
-**value**: current text input.| -| onCopy(callback: (value: string) => void) | Triggered when data is copied to the pasteboard.
-**value**: text copied.| -| onCut(callback: (value: string) => void) | Triggered when data is cut from the pasteboard.
-**value**: text cut.| -| onPaste(callback: (value: string) => void) | Triggered when data is pasted from the pasteboard.
-**value**: text pasted.| +| onSubmit(callback: (value: string) => void) | Triggered when users click the search icon or the search button, or tap the search button on a soft keyboard.
-**value**: current text input. | +| onChange(callback: (value: string) => void) | Triggered when the input in the text box changes.
-**value**: current text input. | +| onCopy(callback: (value: string) => void) | Triggered when data is copied to the pasteboard.
-**value**: text copied. | +| onCut(callback: (value: string) => void) | Triggered when data is cut from the pasteboard.
-**value**: text cut. | +| onPaste(callback: (value: string) => void) | Triggered when data is pasted from the pasteboard.
-**value**: text pasted. | ## SearchController @@ -61,9 +62,9 @@ Sets the position of the caret. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------------------- | - | value | number | Yes | - | Length from the start of the character string to the position where the caret is located.| + | value | number | Yes | - | Length from the start of the character string to the position where the caret is located. | -- GitLab