set the row style to el-table with row-class-name. The row style rendering is chaotic after the data is updated. Do you need to update the row style in the callback with Vue.nextTick ()? if so, how to update the dynamic style: row-class-name= "tableRowClassName" in the callback?
<el-table :data="tableList" :row-class-name="tableRowClassName">...</el-table>
<script>
tableRowClassName({row, rowIndex}) {
if (row.type === 2) {
return "success-row";
}
return "";
},
getList(){
axios.post("/getList", {
uid: this.uid
})
.then(function (response) {
console.log(response);
this.tableList = response.data.dataList
})
.catch(function (error) {
console.log(error);
});
}
</script>