Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add scrollReverse props, autoplay reverse #6589

Merged
merged 3 commits into from Apr 9, 2024

Conversation

Da-Sheng
Copy link
Contributor

@Da-Sheng Da-Sheng commented Apr 7, 2024

when I want auto play from right to left or top to bottom, it's useful

Copy link
Contributor

github-actions bot commented Apr 7, 2024

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6589.surge.sh

@@ -45,6 +45,7 @@ export type SwiperProps = {
defaultIndex?: number
allowTouchMove?: boolean
autoplay?: boolean
scrollReverse?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉可以给 autoplay 加个 reverse:

autoplay?: boolean | 'reverse';


// trigger once
act(() => {
jest.runOnlyPendingTimers()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个默认就是第一个,即便跑了时间,其实还是第一个,这样是测不出来的。需要切换到后面,然后再跑时间

@zombieJ zombieJ merged commit e55ddf9 into ant-design:master Apr 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants