Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
607 views
in Technique[技术] by (71.8m points)

elementui的table的合计 老是超出表格定的高度,计算不及时,怎么办?

表格的height是 calc(100% - 32px) 去掉分页的高度,结果高度超了
height:100%的话,就超到外面了,看不见合计行
image.png

有时候刷新下,他又好了。
f12调试,修改下表格高度,他也好了,开始计算了
image.png

在mounted的时候,根据他外层高度,计算他的height,也没用。
修改他的style,也没用,不会让table组件重新计算。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

它有提供一个doLayout方法,主动调用重新布局试试


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...