From 46fc91aa2d36d5a8d308b674b9fd757f8635c440 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Tue, 12 Jul 2022 12:19:37 +0800 Subject: [PATCH] update ts-basic-components-textpicker.md Signed-off-by: ester.zhou --- .../ts-basic-components-textpicker.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md b/en/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md index d995c82133..0a0365a9d3 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md @@ -1,11 +1,12 @@ # TextPicker -> **NOTE**
-> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. +The **\** component allows users to select text from a list of options. -The **<TextPicker>** component allows users to select text from a list of options. +> **NOTE** +> +> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. ## Required Permissions @@ -15,27 +16,28 @@ None ## Child Components -None +Not supported ## APIs -TextPicker(value: {range: string[], selected?: number}) +TextPicker(value: {range: string[] | Resource, value?: string, selected?: number}) Creates a text picker based on the selection range specified by **range**. -- Parameter +- Parameters | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | range | string[] | Yes | - | Data selection range of the picker. | - | selected | number | No | - | Index value of the selected item in the array. By default, the first element is selected. | + | range | string[]\| [Resource](../../ui/ts-types.md) | Yes | - | Data selection range of the picker. | + | value | string | No | - | Search text. | + | selected | number | No | Index of the first item | Index of the selected item in the array. | ## Attributes | Name | Type | Default Value | Description | | -------- | -------- | -------- | -------- | -| defaultPickerItemHeight | Length | - | Default height of a Picker content item element. | +| defaultPickerItemHeight | Length | - | Default height of an item in the picker. | ## Events @@ -48,7 +50,8 @@ Creates a text picker based on the selection range specified by **range**. ## Example -``` +```ts +// xxx.ets @Entry @Component struct TextPickerExample { -- GitLab