[Bug Report] 动态表头渲染
Open
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.15.14
### OS/Browsers version
window
### Vue version
2.7.16
### Reproduction Link
https://codepen.io/zhanghongrui123/pen/OJYWzMz?editors=1000
### Steps to reproduce
点击Click me!按钮
### What is Expected?
横向滚动条出现在table的最底下
### What is actually happening?
在表头数据过多的情况下,一开始表头会出现换行的情况, 导致表格的内容高度计算不对。
有几种解决的方法,1.给table设置:key="Math.random()" 2.给表头的下面.cell设置 white-space: nowrap
3. 在加载完数据 调用this.$nextTick(this.$refs.table.doLayout),不过这样子的体验感不好,有时候会出现滚动条跳动。还有在table-body.js 的render函数的return之前执行 this.$nextTick(this.table.doLayout),这样子每次加载完数据都会update宽度和高度
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.