From 9db3dc2a489f93e273ac0b4553e24290e53eba3b Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 11 Nov 2023 12:03:39 +0800 Subject: [PATCH] docs: add some commonly used props of react-slick to antd documentation (#45789) --- components/carousel/index.en-US.md | 6 +++++- components/carousel/index.zh-CN.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/carousel/index.en-US.md b/components/carousel/index.en-US.md index 392b1a81e5..484a1d0db5 100644 --- a/components/carousel/index.en-US.md +++ b/components/carousel/index.en-US.md @@ -32,13 +32,17 @@ Common props ref:[Common props](/docs/react/common-props) | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | autoplay | Whether to scroll automatically | boolean | false | | +| autoplaySpeed | Delay between each auto scroll (in milliseconds) | number | 3000 | | | dotPosition | The position of the dots, which can be one of `top` `bottom` `left` `right` | string | `bottom` | | | dots | Whether to show the dots at the bottom of the gallery, `object` for `dotsClass` and any others | boolean \| { className?: string } | true | | -| waitForAnimate | Whether to wait for the animation when switching | boolean | false | | +| fade | Whether to use fade transition | boolean | false | | +| infinite | Infinitely wrap around contents | boolean | true | | +| speed | Animation speed in milliseconds | number | 500 | | | easing | Transition interpolation function name | string | `linear` | | | effect | Transition effect | `scrollx` \| `fade` | `scrollx` | | | afterChange | Callback function called after the current index changes | (current: number) => void | - | | | beforeChange | Callback function called before the current index changes | (current: number, next: number) => void | - | | +| waitForAnimate | Whether to wait for the animation when switching | boolean | false | | ## Methods diff --git a/components/carousel/index.zh-CN.md b/components/carousel/index.zh-CN.md index 4b53c62f12..20958ef57b 100644 --- a/components/carousel/index.zh-CN.md +++ b/components/carousel/index.zh-CN.md @@ -33,13 +33,17 @@ demo: | 参数 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | | autoplay | 是否自动切换 | boolean | false | | +| autoplaySpeed | 自动切换的间隔(毫秒) | number | 3000 | | | dotPosition | 面板指示点位置,可选 `top` `bottom` `left` `right` | string | `bottom` | | | dots | 是否显示面板指示点,如果为 `object` 则同时可以指定 `dotsClass` 或者 | boolean \| { className?: string } | true | | -| waitForAnimate | 是否等待切换动画 | boolean | false | | +| fade | 使用渐变切换动效 | boolean | false | | +| infinite | 是否无限循环切换(实现方式是复制两份 children 元素,如果子元素有副作用则可能会引发 bug) | boolean | true | | +| speed | 切换动效的时间(毫秒) | number | 500 | | | easing | 动画效果 | string | `linear` | | | effect | 动画效果函数 | `scrollx` \| `fade` | `scrollx` | | | afterChange | 切换面板的回调 | (current: number) => void | - | | | beforeChange | 切换面板的回调 | (current: number, next: number) => void | - | | +| waitForAnimate | 是否等待切换动画 | boolean | false | | ## 方法