未验证 提交 d5e8f623 编写于 作者: L luoying_ace 提交者: Gitee

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

Signed-off-by: Nluoying_ace <luoying19@huawei.com>
上级 939bef77
......@@ -15,19 +15,19 @@ show(options?: TextPickerDialogOptions)
- TextPickerDialogOptions参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| range | string[]&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 是 | - | 设置文本选择器的选择范围。 |
| selected | number | 否 | 0 | 设置选中项的索引值。 |
| value | string | 否 | - | 设置选中项的文本内容。当设置了selected参数时,该参数不生效。如果设置的value值不在range范围内,则默认取range第一个元素。|
| defaultPickerItemHeight | number \| string | 否 | - | 设置选择器中选项的高度。 |
| onAccept | (value: TextPickerResult) => void | 否 | - | 点击弹窗中的“确定”按钮时触发该回调。 |
| onCancel | () => void | 否 | - | 点击弹窗中的“取消”按钮时触发该回调。 |
| onChange | (value: TextPickerResult) => void | 否 | - | 滑动弹窗中的选择器使当前选中项改变时触发该回调。 |
| 参数名 | 参数类型 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- |
| range | string[]&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 是 | 设置文本选择器的选择范围。 |
| selected | number | 否 | 设置选中项的索引值。<br>默认值:0 |
| value | string | 否 | 设置选中项的文本内容。当设置了selected参数时,该参数不生效。如果设置的value值不在range范围内,则默认取range第一个元素。|
| defaultPickerItemHeight | number \| string | 否 | 设置选择器中选项的高度。 |
| onAccept | (value: TextPickerResult) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 |
| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 |
| onChange | (value: TextPickerResult) => void | 否 | 滑动弹窗中的选择器使当前选中项改变时触发该回调。 |
- TextPickerResult对象说明
| 名称 | 参数类型 | 描述 |
| 名称 | 类型 | 描述 |
| -------- | -------- | -------- |
| value | string | 选中项的文本内容。 |
| index | number | 选中项在选择范围数组中的索引值。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册