-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
tabs 切换时卡顿 #30736
Comments
性能差异会有多大?记得之前用的是 transform,也有很多渲染问题。 |
Hello @chanelnumberseven. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by 你好 @chanelnumberseven, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 |
https://developers.google.com/web/fundamentals/design-and-ux/animations/animations-and-performance?hl=zh-cn 参考这里的解释当使用transform,opacity来做动画时,会有一个单独的线程(合成器线程)来处理动画,不会占用主线程。给人感觉,性能应该优于非动画属性; 我刚在自己的项目里 尝试了一下transform,确实解决了卡顿的问题,是否可以给用户一个选择 启动css3动画? |
来个对比重现看看? |
https://codesandbox.io/s/recursing-breeze-zzh87?file=/index.js:735-1118 |
我最近在项目中使用多个ant-pro的表格嵌套。使用tabs的来进行切换。确实tab卡顿非常的明显。 |
just mark |
这个例子在我机器上没感觉出明显差异。 |
同 |
https://codesandbox.io/s/recursing-breeze-zzh87?file=/index.js 又改了下,,,感觉都卡,,,非css3动画属性 的执行明显延迟于css3动画属性,我的机器可能老,3000,5000条数据的时候就能感觉出来,, 我同事的机器高配的 10000条数据的时候,才能明显感觉出这种差距,但数据过多都会卡,感觉就算用css3动画属性也不是解决办法 |
我的两个表格数据量不太大,只是请求的接口速度比较慢。loading的时间很长,在loading的过程中卡片切换的样式不会改变。要等我的全部数据渲染出来以后卡顿一会才能把样式切过来。 如果数据量比较小的话,是没有这个问题的。 |
mark |
mark |
1 similar comment
mark |
Close since Tabs animation is changed. |
What problem does this feature solve?
ant-tabs-ink-bar 的动画好像是改变left值做的,用css3动画属性(transform)是不是性能会更好一点?
What does the proposed API look like?
使用css3动画属性(transform:translate)来改变ant-tabs-ink-bar 的移动,解决动画卡顿问题
The text was updated successfully, but these errors were encountered: