問題:element-ui中table-column中有循環,子cell又是使用template(scope)渲染的,當循環數據更新(push,splice,或者重新賦值)時,可能出現子cell不變的情況,從而導致頁面元素和循環數據對不上的報錯問題
猜測:可能是template中的scope沒有變化導致不更新,或者element-ui做了優化避免不必要更新導致的bug
解決:在table上加上隨機數
代碼:<el-table :key="Math.random()" ></el-table>
辣雞element,建議用antd
參考:https://blog.csdn.net/think_of_/article/details/80514859