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

增加倒计时功能&loading禁用onClick #13

Merged
merged 4 commits into from Dec 29, 2018
Merged

Conversation

Liqihan
Copy link
Member

@Liqihan Liqihan commented Dec 28, 2018

No description provided.

@ex90rts ex90rts self-requested a review December 28, 2018 11:25

countFun() {
let { time } = this.state;
this.time = setInterval(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里应该是 timer,下面 37 行一样

Copy link
Contributor

@ex90rts ex90rts left a comment

Choose a reason for hiding this comment

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

  1. 实现方式上,一般都会用一个括号把数字包起来,不然文案后面直接跟一个数字有点突兀
  2. 建议将 countDownCallback 命名改为 onCountDownEnd,以便整体命名风格一致
  3. CountDown 这个类的 27 行、37 行变量名貌似用错了,应该是 this.timer,因为在 unmount 的时候是用的 this.timer
  4. 需要补一下一下 README 文档,注意明确一下 countDown 的单位
  5. propTypes、defaultProps 需要需要补一下

@ex90rts ex90rts merged commit 64ef09e into uxcore:master Dec 29, 2018
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