You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
element-bot
changed the title
[Bug Report] el-table 会导致父组件被渲染两次
[Bug Report] el-table will cause the parent component is rendered two times
Nov 3, 2017
Element UI version
2.0.2
OS/Browsers version
MacOS 10.13.1 / Chrome 63.0.3239.30
Vue version
2.5.2
Reproduction Link
https://jsfiddle.net/pj71jkyw/691/
Steps to reproduce
我实际中的代码是将 el-table 封装成一个子组件的,也是发现被执行2次,如下:
主文件:
What is Expected?
理论上不应该执行2次,使用其它组件不会有这样的问题(比如 el-button)
What is actually happening?
在调用 el-table 时如果没有使用 render() 输出 console.log() 时是不会察觉的被执行2次的,使用 render() 方法后可以察觉出来,所以怀疑是 el-table 有bug会迫使父组件重新渲染一次。
另:封装的这个组件是参考 https://ant.design/components/table-cn/ 做的,感觉使用起来会更简单些,如果可以希望官方能考虑加入 columns 的参数。
The text was updated successfully, but these errors were encountered: