在重用table组件时,重新修改表头和表数据,会造成table样式缓存造成样式错乱问题,使用table自带的方法解决: this.$nexkTick(()=>{ this.$refs.table.doLayout(); })