
一、使用 doLayout 方式(官方推荐)

<el-table
id="excel"
ref="planTableRef"
:row-class-name="tableRowClassName"
:data="plans"
class="pointer"
height="90%"
:span-method="arraySpanMethod"
style="width: 100%"
>
watch:{
"plans":{
handler(){
this.$nextTick(() =>{
this.$refs.planTableRef.doLayout()
});
},
deep: true
}
},
监听 data 的数据,然后调用这个方法即可
版权声明:本文为qq_42184068原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。