未验证 提交 d19377ba 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 5719310f
# Text Picker Dialog Box # Text Picker Dialog Box
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
You can display a text picker in a dialog box to allow users to select text from the given range. You can display a text picker in a dialog box to allow users to select text from the given range.
...@@ -16,20 +16,20 @@ show(options: TextPickerDialogOptions) ...@@ -16,20 +16,20 @@ show(options: TextPickerDialogOptions)
Shows a text picker in the given settings. Shows a text picker in the given settings.
- TextPickerDialogOptions - TextPickerDialogOptions
| Name| Type| Mandatory| Default Value| Description| | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| range | string[] | Yes| - | Data selection range of the picker.| | range | string[] | Yes | - | Data selection range of the picker. |
| selected | number | No| First element| Index value of the selected item in the range.| | selected | number | No | First element | Index value of the selected item in the range. |
| defaultPickerItemHeight | number | No| - | Height of the default selected item in the picker.| | defaultPickerItemHeight | number | No | - | Height of the default selected item in the picker. |
| onAccept | (value: TextPickerResult) => void | No| - | Triggered when the OK button in the dialog box is clicked.| | onAccept | (value: TextPickerResult) => void | No | - | Callback invoked when the OK button in the dialog box is clicked. |
| onCancel | () => void | No| - | Triggered when the Cancel button in the dialog box is clicked.| | onCancel | () => void | No | - | Triggered when the Cancel button in the dialog box is clicked. |
| onChange | (value: TextPickerResult) => void | No| - | Triggered when the selected item in the picker changes.| | onChange | (value: TextPickerResult) => void | No | - | Callback invoked when the selected item in the picker changes. |
- TextPickerResult - TextPickerResult
| Name| Type| Description| | Name | Type | Description |
| -------- | -------- | -------- | | -------- | -------- | -------- |
| value | string | Text of the selected item.| | value | string | Text of the selected item. |
| index | number | Index value of the selected item in the range.| | index | number | Index value of the selected item in the range. |
## Example ## Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册