From 8aad189b8d3b770885bdd7473e1469ffe40b03a6 Mon Sep 17 00:00:00 2001 From: yamila Date: Mon, 8 May 2023 15:48:34 +0800 Subject: [PATCH] update textPicker Signed-off-by: yamila --- .../reference/arkui-ts/ts-basic-components-textpicker.md | 4 +++- .../application-dev/reference/arkui-ts/ts-container-swiper.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md index ae3c675fe3..af6a568d7e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md @@ -40,7 +40,9 @@ TextPicker(options?: {range: string[]|Resource, selected?: number, value?: strin | 名称 | 描述 | | -------- | -------- | -| onChange(callback: (value: string, index: number) => void) | 滑动选中TextPicker文本内容后,触发该回调。
- value: 当前选中项的文本。
- index: 当前选中项的索引值。 | +| onAccept(callback: (value: string, index: number) => void) | 点击弹窗中的“确定”按钮时触发该回调。

- value: 当前选中项的文本。
- index: 当前选中项的索引值。
**说明:**
该事件仅在[文本滑动选择器弹窗](ts-methods-textpicker-dialog.md)中生效。 | +| onCancel(callback: () => void) | 点击弹窗中的“取消”按钮时触发该回调。
**说明:**
该事件仅在[文本滑动选择器弹窗](ts-methods-textpicker-dialog.md)中生效。 | +| onChange(callback: (value: string, index: number) => void) | 滑动选中TextPicker文本内容后,触发该回调。
- value: 当前选中项的文本。
**说明**:当显示文本或图片加文本列表时,value值为选中项中的文本值,当显示图片列表时,value值为空。
- index: 当前选中项的索引值。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md index 28e18abef3..38863585ac 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md @@ -42,7 +42,7 @@ Swiper(controller?: SwiperController) | vertical | boolean | 是否为纵向滑动。
默认值:false | | itemSpace | number \| string | 设置子组件与子组件之间间隙。
默认值:0
**说明:**
不支持设置百分比。 | | displayMode | SwiperDisplayMode | 主轴方向上元素排列的模式,优先以displayCount设置的个数显示,displayCount未设置时本属性生效。
默认值:SwiperDisplayMode.Stretch | -| cachedCount8+ | number | 设置预加载子组件个数。
默认值:1 | +| cachedCount8+ | number | 设置预加载子组件个数。
默认值:1
**说明:**
cachedCount已经做了预加载的优化,不建议与[LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md)一起使用。 | | disableSwipe8+ | boolean | 禁用组件滑动切换功能。
默认值:false | | curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | 设置Swiper的动画曲线,默认为淡入淡出曲线,常用曲线参考[Curve枚举说明](ts-appendix-enums.md#curve),也可以通过[插值计算](../apis/js-apis-curve.md)模块提供的接口创建自定义的插值曲线对象。
默认值:Curve.Ease | | indicatorStyle8+ | {
left?: [Length](ts-types.md#length),
top?: [Length](ts-types.md#length),
right?: [Length](ts-types.md#length),
bottom?: [Length](ts-types.md#length),
size?: [Length](ts-types.md#length),
mask?: boolean,
color?: [ResourceColor](ts-types.md),
selectedColor?: [ResourceColor](ts-types.md)
} | 设置导航点样式:
\- left: 设置导航点距离Swiper组件左边的距离。
\- top: 设置导航点距离Swiper组件顶部的距离。
\- right: 设置导航点距离Swiper组件右边的距离。
\- bottom: 设置导航点距离Swiper组件底部的距离。
\- size: 设置导航点的直径。
\- mask: 设置是否显示导航点蒙层样式。
\- color: 设置导航点的颜色。
\- selectedColor: 设置选中的导航点的颜色。 | -- GitLab