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 9f1d13ee9981696905d9383abfde395aa2162c1b..1086c3e68b3f5ca5d7d4383a62477d429ea122e4 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 @@ -12,14 +12,14 @@ Not supported ## APIs -Search(options?: { value?: string; placeholder?: string; icon?: string; controller?: SearchController }) +Search(options?: { value?: string; placeholder?: ResourceStr; icon?: string; controller?: SearchController }) **Parameters** | Name | Type | Mandatory| Description | | ----------- | ---------------- | ---- | ------------------------------------------------------------ | -| value | string | No | Text input in the search text box. | -| placeholder | string | No | Text displayed when there is no input. | +| value | string | No | Text input in the search text box. | +| placeholder | [ResourceStr](ts-types.md#resourcestr)10+ | 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 of the **\** component. | @@ -29,12 +29,46 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Name | Type | Description | | ----------------------- | ------------------------------------------------ | ---------------------------------------------- | -| searchButton | string | Text on the search button located next to the search text box. By default, there is no search button. | +| searchButton10+ | value: string,
option?: [SearchButtonOption](#searchbuttonoption10) | Text on the search button located next to the search text box. By default, there is no search button. | | placeholderColor | [ResourceColor](ts-types.md#resourcecolor) | Placeholder text color. | | placeholderFont | [Font](ts-types.md#font) | Placeholder text font. | | textFont | [Font](ts-types.md#font) | Text font for the search text box. | | textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Text alignment mode in the search text box.
Default value: **TextAlign.Start** | | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | Whether copy and paste is allowed. | +| searchIcon10+ | [IconOptions](#iconoptions10) | Style of the search icon on the left. | +| cancelButton10+ | {
style? : [CancelButtonStyle](#cancelbuttonstyle10)
icon?: [IconOptions](#iconoptions10)
} | Style of the Cancel button on the right. | +| fontColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Font color of the input text. | +| caretStyle10+ | [CaretStyle](#caretstyle10) | Caret style. | + +## IconOptions10+ + +| Name| Type | Mandatory| Description | +| ------ | ------------------------------------------ | ---- | ----------- | +| size | [Length](ts-types.md#length) | No | Icon size. | +| color | [ResourceColor](ts-types.md#resourcecolor) | No | Icon color. | +| src | [ResourceStr](ts-types.md#resourcestr) | No | Image source of the icon.| + +## CaretStyle10+ + +| Name| Type | Mandatory| Description| +| ------ | ------------------------------------------ | ---- | -------- | +| width | [Length](ts-types.md#length) | No | Caret width.| +| color | [ResourceColor](ts-types.md#resourcecolor) | No | Caret color.| + +## SearchButtonOption10+ + +| Name | Type | Mandatory| Description | +| --------- | ------------------------------------------ | ---- | ---------------- | +| fontSize | [Length](ts-types.md#length) | No | Font size of the button.| +| fontColor | [ResourceColor](ts-types.md#resourcecolor) | No | Font color of the button.| + +## CancelButtonStyle10+ + +| Name | Description | +| ----------------------- | ---------------- | +| CONSTANT10+ | The Cancel button is always displayed.| +| INVISIBLE10+ | The Cancel button is always hidden.| +| INPUT10+ | The Cancel button is displayed when there is text input.| ## Events