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

状态和进度不同步 #4

Closed
wuzhao opened this issue Dec 29, 2015 · 3 comments
Closed

状态和进度不同步 #4

wuzhao opened this issue Dec 29, 2015 · 3 comments
Assignees

Comments

@wuzhao
Copy link

wuzhao commented Dec 29, 2015

先显示状态再变跟进度,如果变化区间较大时感觉到唐突,如下图:

3

@benjycui
Copy link
Member

现在还没有相对完善的破解方式,see:facebook/react#2187

@afc163 afc163 assigned afc163 and unassigned benjycui Jan 26, 2016
@afc163
Copy link
Member

afc163 commented Jan 26, 2016

看图片表现是先设置了 status="success" 再 设置了 percent={100}

业务上需要保持同步设置,一般只需设置 percent 就好。

先关了。

@afc163 afc163 closed this as completed Jan 26, 2016
@benjycui
Copy link
Member

https://github.com/ant-design/ant-design/blob/develop-0.12.0/components/progress/index.jsx#L124

其实 Progress.Circle 会自行更新状态的。所以出现这种现象是原因是因为,进度已经 100% 了,所以 Progress.Circle 自行设置状态为 success,同时设置 stroke-dashoffset,但因为样式的 transition 设置了 delay,所以状态在动画执行完之前就已经切换了。

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

No branches or pull requests

3 participants