[bug report] when using El table, set the index and formatter properties of table column, and the bound method will be called many times
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.15.1
### OS/Browsers version
mac os 10.15.7 / chrome 87.0.4280.88
### Vue version
2.6.11
### Reproduction Link
https://codepen.io/sixting/pen/Jjbpbwo?editors=1111
### Steps to reproduce
el-table 设置其 height 属性为 100%, 最外层容器的高度设置为 100px, 当展示的内容超出该设定区域的高度时(出现滚动条),Table-column 的 index 和 formatter 属性所绑定的方法就会触发多次。
如果展示区域内容不超过最外层容器高度(不出现滚动条,最外层容器的高度设置为 1000px),则 Table-column 的 index 和 formatter 属性所绑定的方法就会只触发一次(正常的)
### What is Expected?
Table-column 的 index 和 formatter 属性所绑定的方法,在渲染的时候,只触发一次,在上述的例子中,期望的行为就是,打印四次结果
### What is actually happening?
出现滚动条,Table-column 的 index 和 formatter 属性所绑定的方法,在渲染的时候,触发多次,在上述的例子中,实际的行为就是,打印八次结果
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.