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

[Table] 每一列都使用 show-overflow-tooltip 会性能很差 #1899

Closed
HeftyKoo opened this issue Dec 21, 2016 · 4 comments
Closed

[Table] 每一列都使用 show-overflow-tooltip 会性能很差 #1899

HeftyKoo opened this issue Dec 21, 2016 · 4 comments

Comments

@HeftyKoo
Copy link

ElementUI version

1.0.8

OS/Browers version

macOS/Chrome 55

Vue version

2.1.6

Reproduction Link

http://jsfiddle.net/tw545ug4/

What is actually happening?

table表格的数据量多的时候(100条左右)就操作就很不流畅,全选或者选中的反应很慢,路由切换的时候卡顿感很明显。(在录屏中,颜色和分类页的切换很流畅的,订单处理页如果是15条数据的时候也很流畅,但是数据量到95的时候就很卡了)

屏幕录像在这里

@furybean
Copy link
Contributor

furybean commented Dec 21, 2016

@yeyuqiudeng show-overflow-tooltip 是为超长的文本准备的,只适用于某一两列超长显示。如果每一列都开启 show-overflow-tooltip,会在 Table 的单元格里面创建成千上万个 Tooltip 组件,这个非常影响性能,建议调整使用方式。

@furybean furybean changed the title table表格的性能问题,数据量稍微多点就很卡顿 [Table] 每一列都使用 show-overflow-tooltip 会性能很差 Dec 21, 2016
@HeftyKoo
Copy link
Author

@furybean 好的,我试一下,谢谢

@HeftyKoo
Copy link
Author

@furybean 去掉show-overflow-tooltip 后好很多了,但是将拿到的数据(100条左右)存到vuex中,路由切换回来的时候,再从vuex中取出数据渲染,渲染得还是有点慢,大概需要2秒左右

@HeftyKoo
Copy link
Author

现在将数据量大的table组件延迟渲染,体验好多了

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

2 participants