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

Circle渲染完数据会出现百分比条抖动问题,进度条一下一上,怎么解决 #3373

Closed
LitChi666 opened this issue Jul 13, 2020 · 4 comments · Fixed by #4152
Labels

Comments

@LitChi666
Copy link

你好,请使用下面的链接创建 issue 以帮助我们更快的排查问题,不规范的 issue 会被关闭,感谢配合。

https://youzan.github.io/vant-issue-generater?repo=VantWeapp

@thorn929
Copy link

有小数点就会抖动比如, 8.5%

@thorn929
Copy link

你好,请使用下面的链接创建 issue 以帮助我们更快的排查问题,不规范的 issue 会被关闭,感谢配合。

https://youzan.github.io/vant-issue-generater?repo=VantWeapp

有小数点就会抖动比如, 8.5%

@rex-zsd
Copy link
Collaborator

rex-zsd commented Jul 16, 2020

circle 组件基于 canvas 实现,图形是一次绘制成型的。
出现抖动的情况,可能是传入的 value 值一直在来回变化,不断重新渲染。或者原生 canvas 内部绘制有抖动,如上面提到的小数点情况。
这方面 circle 组件基本没有什么可优化的余地,建议在使用的时候考虑这些情况。

@TengFeiHao
Copy link

这个是因为,源码内部在写动画的时候,做了+1 -1 的操作判断相等的时候才会终止绘制,小数点肯定不会有相等的情况导致出现这个问题,应该是动画的原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants