Skip to content

Conversation

@yoyo837
Copy link

@yoyo837 yoyo837 commented Jun 2, 2020

this.ro.disconnect();
};
UNSAFE_componentWillReceiveProps = nextProps => {
const { autoplay } = this.props;
Copy link
Member

Choose a reason for hiding this comment

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

下面是不是可以直接用this.props.autoplay?,autoplay只用了一次,而且看上下文都没有用解构

@kerm1it
Copy link
Member

kerm1it commented Jun 2, 2020

@yoyo837 autoplay 方法内部用到了 this.props.autoplaySpeed 是不是也得判断一下变化没有?

@yoyo837
Copy link
Author

yoyo837 commented Jun 2, 2020

明天再改改

@afc163 afc163 merged commit 03e0bd8 into ant-design:master Jun 17, 2020
@yoyo837 yoyo837 deleted the fix-autoplay-when-update branch June 18, 2020 03:25
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.

存在自定义setInterval逻辑时,Carousel组件的autoplay失效了

3 participants