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

修正 Progress 动画时间变化时失效的问题 #21

Merged
merged 5 commits into from
Dec 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Progress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Progress extends Component {
/* eslint-enable */
Animated.timing(this.state.progressWidth, {
toValue: progressWidth,
duration: this.props.duration,
duration: nextProps.duration,
// linear animation looks smoother
easing: Easing.linear,
}).start();
Expand Down Expand Up @@ -123,7 +123,9 @@ Progress.propTypes = {
// 进度条样式
innerStyle: View.propTypes.style,
// 动画时长
/* eslint-disable */
duration: PropTypes.number,
/* eslint-enable */
// 进度值
value: PropTypes.number,
// 是否显示进度值
Expand Down