-
Notifications
You must be signed in to change notification settings - Fork 875
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
countdown倒计时组件存在显示问题 #194
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
比如倒计时从02:01开始,下一秒会显示01:60,而不是02:00
原因是源码中的
diff绝大多数时候都是一个带毫秒数的浮点数,这就导致后面的
几乎不会有等于60的情形,diff最后运算结果成为sec,这总是一个1-60的数字,而非预期的0-59。
我的解决方案是将diff先取整
毫秒的运算要改成从原始的浮点数取值
The text was updated successfully, but these errors were encountered: