Skip to content

Tabs 切换卡顿 #3592

@happydoop

Description

@happydoop
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.9

Environment

win10, chrome 87.0.4280.141;Vue 3

Reproduction link

https://2x.antdv.com/components/tabs-cn/

Steps to reproduce

在某个tab pane中有大量dom时(如:一个tab pane中有5个handsontable实例),此时tabs切换会 非常 卡顿!

What is expected?

即使某个pane中含有大量dom,切换也应该流畅

What is actually happening?

dom多时,切换卡顿


通过性能分析,发现 getTypeValue 会频繁调用 js 中的 getComputedStyle 方法导致不断reflow

源码截图

仅仅是getTypeValue这一个函数调用就用了 437.6 ms!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions